diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md index f4d8ab12ac0c8..6c42fd83be258 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-08-05) + +- Azure Resource Manager Machine Learning client library for Java. This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-preview-2022-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md index 1c3706cbd2c4e..e3cf7ee702f15 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Machine Learning client library for Java. -This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2022-02-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-preview-2022-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-machinelearning - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md index b28a237d2e917..994f545ec80a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md @@ -58,6 +58,8 @@ - [Start](#compute_start) - [Stop](#compute_stop) - [Update](#compute_update) +- [UpdateCustomServices](#compute_updatecustomservices) +- [UpdateIdleShutdownSetting](#compute_updateidleshutdownsetting) ## DataContainers @@ -103,6 +105,16 @@ - [Get](#jobs_get) - [List](#jobs_list) +## LabelingJobs + +- [CreateOrUpdate](#labelingjobs_createorupdate) +- [Delete](#labelingjobs_delete) +- [ExportLabels](#labelingjobs_exportlabels) +- [Get](#labelingjobs_get) +- [List](#labelingjobs_list) +- [Pause](#labelingjobs_pause) +- [Resume](#labelingjobs_resume) + ## ModelContainers - [CreateOrUpdate](#modelcontainers_createorupdate) @@ -158,6 +170,13 @@ - [List](#quotas_list) - [Update](#quotas_update) +## Schedules + +- [CreateOrUpdate](#schedules_createorupdate) +- [Delete](#schedules_delete) +- [Get](#schedules_get) +- [List](#schedules_list) + ## Usages - [List](#usages_list) @@ -198,15 +217,15 @@ ```java import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentDetails; +import com.azure.resourcemanager.machinelearning.models.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.ResourceConfiguration; import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; @@ -218,7 +237,7 @@ import java.util.Map; /** Samples for BatchDeployments CreateOrUpdate. */ public final class BatchDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Batch Deployment. @@ -233,7 +252,7 @@ public final class BatchDeploymentsCreateOrUpdateSamples { .withRegion("string") .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") .withProperties( - new BatchDeploymentDetails() + new BatchDeploymentProperties() .withCodeConfiguration(new CodeConfiguration().withCodeId("string").withScoringScript("string")) .withDescription("string") .withEnvironmentId("string") @@ -248,7 +267,7 @@ public final class BatchDeploymentsCreateOrUpdateSamples { .withOutputAction(BatchOutputAction.SUMMARY_ONLY) .withOutputFileName("string") .withResources( - new ResourceConfiguration() + new DeploymentResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -298,7 +317,7 @@ import com.azure.core.util.Context; /** Samples for BatchDeployments Delete. */ public final class BatchDeploymentsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/delete.json */ /** * Sample code: Delete Batch Deployment. @@ -321,7 +340,7 @@ import com.azure.core.util.Context; /** Samples for BatchDeployments Get. */ public final class BatchDeploymentsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/get.json */ /** * Sample code: Get Batch Deployment. @@ -344,7 +363,7 @@ import com.azure.core.util.Context; /** Samples for BatchDeployments List. */ public final class BatchDeploymentsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/list.json */ /** * Sample code: List Batch Deployment. @@ -362,38 +381,24 @@ public final class BatchDeploymentsListSamples { ### BatchDeployments_Update ```java -import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentData; -import com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel; -import com.azure.resourcemanager.machinelearning.models.BatchOutputAction; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.BatchDeployment; import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchRetrySettings; -import com.azure.resourcemanager.machinelearning.models.PartialCodeConfiguration; -import com.azure.resourcemanager.machinelearning.models.PartialIdAssetReference; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.io.IOException; -import java.time.Duration; import java.util.HashMap; import java.util.Map; /** Samples for BatchDeployments Update. */ public final class BatchDeploymentsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/update.json */ /** * Sample code: Update Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - BatchDeploymentData resource = + public static void updateBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + BatchDeployment resource = manager .batchDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) @@ -401,41 +406,7 @@ public final class BatchDeploymentsUpdateSamples { resource .update() .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties( - new PartialBatchDeployment() - .withCodeConfiguration( - new PartialCodeConfiguration().withCodeId("string").withScoringScript("string")) - .withCompute("string") - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withErrorThreshold(1) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withMaxConcurrencyPerInstance(1) - .withMiniBatchSize(1L) - .withModel(new PartialIdAssetReference().withAssetId("string")) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("string") - .withProperties(mapOf("string", "string")) - .withRetrySettings( - new PartialBatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) + .withProperties(new PartialBatchDeployment().withDescription("string")) .apply(); } @@ -456,7 +427,7 @@ public final class BatchDeploymentsUpdateSamples { ```java import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDetails; +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; @@ -469,7 +440,7 @@ import java.util.Map; /** Samples for BatchEndpoints CreateOrUpdate. */ public final class BatchEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Batch Endpoint. @@ -484,7 +455,7 @@ public final class BatchEndpointsCreateOrUpdateSamples { .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new BatchEndpointDetails() + new BatchEndpointProperties() .withAuthMode(EndpointAuthMode.AMLTOKEN) .withDescription("string") .withProperties(mapOf("string", "string")) @@ -526,7 +497,7 @@ import com.azure.core.util.Context; /** Samples for BatchEndpoints Delete. */ public final class BatchEndpointsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/delete.json */ /** * Sample code: Delete Batch Endpoint. @@ -547,7 +518,7 @@ import com.azure.core.util.Context; /** Samples for BatchEndpoints Get. */ public final class BatchEndpointsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/get.json */ /** * Sample code: Get Batch Endpoint. @@ -568,7 +539,7 @@ import com.azure.core.util.Context; /** Samples for BatchEndpoints List. */ public final class BatchEndpointsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/list.json */ /** * Sample code: List Batch Endpoint. @@ -589,7 +560,7 @@ import com.azure.core.util.Context; /** Samples for BatchEndpoints ListKeys. */ public final class BatchEndpointsListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/listKeys.json */ /** * Sample code: ListKeys Batch Endpoint. @@ -608,13 +579,9 @@ public final class BatchEndpointsListKeysSamples { import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointData; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; +import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpoint; import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -622,7 +589,7 @@ import java.util.Map; /** Samples for BatchEndpoints Update. */ public final class BatchEndpointsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/update.json */ /** * Sample code: Update Batch Endpoint. @@ -631,7 +598,7 @@ public final class BatchEndpointsUpdateSamples { */ public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - BatchEndpointData resource = + BatchEndpoint resource = manager .batchEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE) @@ -648,16 +615,6 @@ public final class BatchEndpointsUpdateSamples { SerializerFactory .createDefaultManagementSerializerAdapter() .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties( - new PartialBatchEndpoint().withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) .apply(); } @@ -677,14 +634,14 @@ public final class BatchEndpointsUpdateSamples { ### CodeContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.CodeContainerDetails; +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/preview/2022-02-01-preview/examples/CodeContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Code Container. @@ -698,7 +655,7 @@ public final class CodeContainersCreateOrUpdateSamples { .define("testContainer") .withExistingWorkspace("testrg123", "testworkspace") .withProperties( - new CodeContainerDetails() + new CodeContainerProperties() .withDescription("string") .withTags(mapOf("tag1", "value1", "tag2", "value2"))) .create(); @@ -725,7 +682,7 @@ import com.azure.core.util.Context; /** Samples for CodeContainers Delete. */ public final class CodeContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeContainer/delete.json */ /** * Sample code: Delete Code Container. @@ -746,7 +703,7 @@ import com.azure.core.util.Context; /** Samples for CodeContainers Get. */ public final class CodeContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeContainer/get.json */ /** * Sample code: Get Code Container. @@ -767,7 +724,7 @@ import com.azure.core.util.Context; /** Samples for CodeContainers List. */ public final class CodeContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeContainer/list.json */ /** * Sample code: List Code Container. @@ -783,14 +740,14 @@ public final class CodeContainersListSamples { ### CodeVersions_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.CodeVersionDetails; +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/preview/2022-02-01-preview/examples/CodeVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Code Version. @@ -804,7 +761,7 @@ public final class CodeVersionsCreateOrUpdateSamples { .define("string") .withExistingCode("test-rg", "my-aml-workspace", "string") .withProperties( - new CodeVersionDetails() + new CodeVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) @@ -834,7 +791,7 @@ import com.azure.core.util.Context; /** Samples for CodeVersions Delete. */ public final class CodeVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeVersion/delete.json */ /** * Sample code: Delete Code Version. @@ -855,7 +812,7 @@ import com.azure.core.util.Context; /** Samples for CodeVersions Get. */ public final class CodeVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeVersion/get.json */ /** * Sample code: Get Code Version. @@ -876,7 +833,7 @@ import com.azure.core.util.Context; /** Samples for CodeVersions List. */ public final class CodeVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeVersion/list.json */ /** * Sample code: List Code Version. @@ -892,14 +849,14 @@ public final class CodeVersionsListSamples { ### ComponentContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.ComponentContainerDetails; +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/preview/2022-02-01-preview/examples/ComponentContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Component Container. @@ -913,7 +870,7 @@ public final class ComponentContainersCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new ComponentContainerDetails() + new ComponentContainerProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string"))) @@ -941,7 +898,7 @@ import com.azure.core.util.Context; /** Samples for ComponentContainers Delete. */ public final class ComponentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentContainer/delete.json */ /** * Sample code: Delete Component Container. @@ -963,7 +920,7 @@ import com.azure.core.util.Context; /** Samples for ComponentContainers Get. */ public final class ComponentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentContainer/get.json */ /** * Sample code: Get Component Container. @@ -984,7 +941,7 @@ import com.azure.core.util.Context; /** Samples for ComponentContainers List. */ public final class ComponentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentContainer/list.json */ /** * Sample code: List Component Container. @@ -1003,7 +960,7 @@ public final class ComponentContainersListSamples { ```java import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionDetails; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -1011,7 +968,7 @@ import java.util.Map; /** Samples for ComponentVersions CreateOrUpdate. */ public final class ComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Component Version. @@ -1025,7 +982,7 @@ public final class ComponentVersionsCreateOrUpdateSamples { .define("string") .withExistingComponent("test-rg", "my-aml-workspace", "string") .withProperties( - new ComponentVersionDetails() + new ComponentVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) @@ -1061,7 +1018,7 @@ import com.azure.core.util.Context; /** Samples for ComponentVersions Delete. */ public final class ComponentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentVersion/delete.json */ /** * Sample code: Delete Component Version. @@ -1083,7 +1040,7 @@ import com.azure.core.util.Context; /** Samples for ComponentVersions Get. */ public final class ComponentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentVersion/get.json */ /** * Sample code: Get Component Version. @@ -1104,7 +1061,7 @@ import com.azure.core.util.Context; /** Samples for ComponentVersions List. */ public final class ComponentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentVersion/list.json */ /** * Sample code: List Component Version. @@ -1132,27 +1089,38 @@ 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.CustomService; import com.azure.resourcemanager.machinelearning.models.DataFactory; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; import com.azure.resourcemanager.machinelearning.models.Kubernetes; import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; import com.azure.resourcemanager.machinelearning.models.OsType; import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; +import com.azure.resourcemanager.machinelearning.models.Protocol; import com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess; import com.azure.resourcemanager.machinelearning.models.ResourceId; import com.azure.resourcemanager.machinelearning.models.ScaleSettings; import com.azure.resourcemanager.machinelearning.models.SshPublicAccess; import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; import com.azure.resourcemanager.machinelearning.models.VmPriority; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; import java.time.Duration; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Compute CreateOrUpdate. */ public final class ComputeCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. @@ -1170,7 +1138,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/AKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. @@ -1193,7 +1161,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -1230,7 +1198,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -1266,7 +1234,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -1289,6 +1257,42 @@ public final class ComputeCreateOrUpdateSamples { .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) .withSshSettings( new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) + .withCustomServices( + Arrays + .asList( + new CustomService() + .withName("rstudio-workbench") + .withImage( + new Image() + .withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rstudio-workbench:latest") + .withAdditionalProperties(mapOf())) + .withEnvironmentVariables( + mapOf( + "RSP_LICENSE", + new EnvironmentVariable() + .withType(EnvironmentVariableType.LOCAL) + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") + .withAdditionalProperties(mapOf()))) + .withDocker( + new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints( + Arrays + .asList( + new Endpoint() + .withProtocol(Protocol.HTTP) + .withName("connect") + .withTarget(8787) + .withPublished(4444))) + .withVolumes( + Arrays + .asList( + new VolumeDefinition() + .withType(VolumeDefinitionType.BIND) + .withReadOnly(true) + .withSource("/mnt/azureuser/") + .withTarget("/home/testuser/"))) + .withAdditionalProperties(mapOf()))) .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) .withPersonalComputeInstanceSettings( new PersonalComputeInstanceSettings() @@ -1300,7 +1304,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -1320,7 +1324,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/AmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -1347,7 +1351,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. @@ -1387,7 +1391,7 @@ import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction /** Samples for Compute Delete. */ public final class ComputeDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/delete.json */ /** * Sample code: Delete Compute. @@ -1410,7 +1414,7 @@ import com.azure.core.util.Context; /** Samples for Compute Get. */ public final class ComputeGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/get/AKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -1422,7 +1426,7 @@ public final class ComputeGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/get/KubernetesCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. @@ -1434,7 +1438,7 @@ public final class ComputeGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/get/ComputeInstance.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. @@ -1446,7 +1450,7 @@ public final class ComputeGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/get/AmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. @@ -1467,7 +1471,7 @@ import com.azure.core.util.Context; /** Samples for Compute List. */ public final class ComputeListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/list.json */ /** * Sample code: Get Computes. @@ -1488,7 +1492,7 @@ import com.azure.core.util.Context; /** Samples for Compute ListKeys. */ public final class ComputeListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. @@ -1509,7 +1513,7 @@ import com.azure.core.util.Context; /** Samples for Compute ListNodes. */ public final class ComputeListNodesSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/listNodes.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. @@ -1531,7 +1535,7 @@ import com.azure.core.util.Context; /** Samples for Compute Restart. */ public final class ComputeRestartSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/restart.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. @@ -1553,7 +1557,7 @@ import com.azure.core.util.Context; /** Samples for Compute Start. */ public final class ComputeStartSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/start.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. @@ -1575,7 +1579,7 @@ import com.azure.core.util.Context; /** Samples for Compute Stop. */ public final class ComputeStopSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/stop.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. @@ -1601,7 +1605,7 @@ import java.time.Duration; /** Samples for Compute Update. */ public final class ComputeUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/patch.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. @@ -1626,10 +1630,125 @@ public final class ComputeUpdateSamples { } ``` +### Compute_UpdateCustomServices + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; +import com.azure.resourcemanager.machinelearning.models.Protocol; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Compute UpdateCustomServices. */ +public final class ComputeUpdateCustomServicesSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/updateCustomServices.json + */ + /** + * Sample code: Update Custom Services. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateCustomServices(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .computes() + .updateCustomServicesWithResponse( + "testrg123", + "workspaces123", + "compute123", + Arrays + .asList( + new CustomService() + .withName("rstudio-workbench") + .withImage( + new Image() + .withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rstudio-workbench:latest") + .withAdditionalProperties(mapOf())) + .withEnvironmentVariables( + mapOf( + "RSP_LICENSE", + new EnvironmentVariable() + .withType(EnvironmentVariableType.LOCAL) + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") + .withAdditionalProperties(mapOf()))) + .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints( + Arrays + .asList( + new Endpoint() + .withProtocol(Protocol.HTTP) + .withName("connect") + .withTarget(8787) + .withPublished(4444))) + .withVolumes( + Arrays + .asList( + new VolumeDefinition() + .withType(VolumeDefinitionType.BIND) + .withReadOnly(true) + .withSource("/mnt/azureuser/") + .withTarget("/home/testuser/"))) + .withAdditionalProperties(mapOf())), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Compute_UpdateIdleShutdownSetting + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; + +/** Samples for Compute UpdateIdleShutdownSetting. */ +public final class ComputeUpdateIdleShutdownSettingSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/updateIdleShutdownSetting.json + */ + /** + * Sample code: Update idle shutdown setting of ComputeInstance. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateIdleShutdownSettingOfComputeInstance( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .computes() + .updateIdleShutdownSettingWithResponse( + "testrg123", + "workspaces123", + "compute123", + new IdleShutdownSetting().withIdleTimeBeforeShutdown("PT120M"), + Context.NONE); + } +} +``` + ### DataContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.DataContainerDetails; +import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; import com.azure.resourcemanager.machinelearning.models.DataType; import java.util.HashMap; import java.util.Map; @@ -1637,7 +1756,7 @@ import java.util.Map; /** Samples for DataContainers CreateOrUpdate. */ public final class DataContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Data Container. @@ -1651,11 +1770,11 @@ public final class DataContainersCreateOrUpdateSamples { .define("datacontainer123") .withExistingWorkspace("testrg123", "workspace123") .withProperties( - new DataContainerDetails() + new DataContainerProperties() .withDescription("string") .withProperties(mapOf("properties1", "value1", "properties2", "value2")) .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withDataType(DataType.URI_FILE)) + .withDataType(DataType.fromString("UriFile"))) .create(); } @@ -1680,7 +1799,7 @@ import com.azure.core.util.Context; /** Samples for DataContainers Delete. */ public final class DataContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataContainer/delete.json */ /** * Sample code: Delete Data Container. @@ -1701,7 +1820,7 @@ import com.azure.core.util.Context; /** Samples for DataContainers Get. */ public final class DataContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataContainer/get.json */ /** * Sample code: Get Data Container. @@ -1722,7 +1841,7 @@ import com.azure.core.util.Context; /** Samples for DataContainers List. */ public final class DataContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataContainer/list.json */ /** * Sample code: List Data Container. @@ -1745,7 +1864,7 @@ import java.util.Map; /** Samples for DataVersions CreateOrUpdate. */ public final class DataVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataVersionBase/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Data Version Base. @@ -1789,7 +1908,7 @@ import com.azure.core.util.Context; /** Samples for DataVersions Delete. */ public final class DataVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataVersionBase/delete.json */ /** * Sample code: Delete Data Version Base. @@ -1810,7 +1929,7 @@ import com.azure.core.util.Context; /** Samples for DataVersions Get. */ public final class DataVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataVersionBase/get.json */ /** * Sample code: Get Data Version Base. @@ -1831,7 +1950,7 @@ import com.azure.core.util.Context; /** Samples for DataVersions List. */ public final class DataVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataVersionBase/list.json */ /** * Sample code: List Data Version Base. @@ -1864,7 +1983,7 @@ import java.util.UUID; /** Samples for Datastores CreateOrUpdate. */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). @@ -1894,7 +2013,7 @@ public final class DatastoresCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). @@ -1927,7 +2046,7 @@ public final class DatastoresCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). @@ -1956,7 +2075,7 @@ public final class DatastoresCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). @@ -2005,7 +2124,7 @@ import com.azure.core.util.Context; /** Samples for Datastores Delete. */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/delete.json */ /** * Sample code: Delete datastore. @@ -2026,7 +2145,7 @@ import com.azure.core.util.Context; /** Samples for Datastores Get. */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/get.json */ /** * Sample code: Get datastore. @@ -2048,7 +2167,7 @@ import java.util.Arrays; /** Samples for Datastores List. */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/list.json */ /** * Sample code: List datastores. @@ -2081,7 +2200,7 @@ import com.azure.core.util.Context; /** Samples for Datastores ListSecrets. */ public final class DatastoresListSecretsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/listSecrets.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. @@ -2097,14 +2216,14 @@ public final class DatastoresListSecretsSamples { ### EnvironmentContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerDetails; +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/preview/2022-02-01-preview/examples/EnvironmentContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Environment Container. @@ -2118,7 +2237,7 @@ public final class EnvironmentContainersCreateOrUpdateSamples { .define("testEnvironment") .withExistingWorkspace("testrg123", "testworkspace") .withProperties( - new EnvironmentContainerDetails() + new EnvironmentContainerProperties() .withDescription("string") .withProperties( mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) @@ -2148,7 +2267,7 @@ import com.azure.core.util.Context; /** Samples for EnvironmentContainers Delete. */ public final class EnvironmentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentContainer/delete.json */ /** * Sample code: Delete Environment Container. @@ -2170,7 +2289,7 @@ import com.azure.core.util.Context; /** Samples for EnvironmentContainers Get. */ public final class EnvironmentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentContainer/get.json */ /** * Sample code: Get Environment Container. @@ -2192,7 +2311,7 @@ import com.azure.core.util.Context; /** Samples for EnvironmentContainers List. */ public final class EnvironmentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentContainer/list.json */ /** * Sample code: List Environment Container. @@ -2210,7 +2329,7 @@ public final class EnvironmentContainersListSamples { ```java import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionDetails; +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; @@ -2219,7 +2338,7 @@ import java.util.Map; /** Samples for EnvironmentVersions CreateOrUpdate. */ public final class EnvironmentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Environment Version. @@ -2233,7 +2352,7 @@ public final class EnvironmentVersionsCreateOrUpdateSamples { .define("string") .withExistingEnvironment("test-rg", "my-aml-workspace", "string") .withProperties( - new EnvironmentVersionDetails() + new EnvironmentVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) @@ -2274,7 +2393,7 @@ import com.azure.core.util.Context; /** Samples for EnvironmentVersions Delete. */ public final class EnvironmentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentVersion/delete.json */ /** * Sample code: Delete Environment Version. @@ -2298,7 +2417,7 @@ import com.azure.core.util.Context; /** Samples for EnvironmentVersions Get. */ public final class EnvironmentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentVersion/get.json */ /** * Sample code: Get Environment Version. @@ -2319,7 +2438,7 @@ import com.azure.core.util.Context; /** Samples for EnvironmentVersions List. */ public final class EnvironmentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentVersion/list.json */ /** * Sample code: List Environment Version. @@ -2343,7 +2462,7 @@ import com.azure.core.util.Context; /** Samples for Jobs Cancel. */ public final class JobsCancelSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/cancel.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/cancel.json */ /** * Sample code: Cancel Job. @@ -2351,7 +2470,7 @@ public final class JobsCancelSamples { * @param manager Entry point to MachineLearningManager. */ public static void cancelJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().cancelWithResponse("test-rg", "my-aml-workspace", "string", Context.NONE); + manager.jobs().cancel("test-rg", "my-aml-workspace", "string", Context.NONE); } } ``` @@ -2365,14 +2484,13 @@ import com.azure.resourcemanager.machinelearning.models.AmlToken; import com.azure.resourcemanager.machinelearning.models.AutoMLJob; import com.azure.resourcemanager.machinelearning.models.CommandJob; import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; -import com.azure.resourcemanager.machinelearning.models.CronSchedule; import com.azure.resourcemanager.machinelearning.models.Goal; import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; import com.azure.resourcemanager.machinelearning.models.ImageClassification; import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageVerticalDataSettings; +import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; import com.azure.resourcemanager.machinelearning.models.JobService; import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; @@ -2381,17 +2499,13 @@ import com.azure.resourcemanager.machinelearning.models.Mpi; import com.azure.resourcemanager.machinelearning.models.Objective; import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import com.azure.resourcemanager.machinelearning.models.ResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; import com.azure.resourcemanager.machinelearning.models.SweepJob; import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import com.azure.resourcemanager.machinelearning.models.TrainingDataSettings; import com.azure.resourcemanager.machinelearning.models.TrialComponent; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2399,7 +2513,7 @@ import java.util.Map; /** Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/AutoMLJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -2422,13 +2536,6 @@ public final class JobsCreateOrUpdateSamples { .withExperimentName("string") .withIdentity(new AmlToken()) .withIsArchived(false) - .withSchedule( - new CronSchedule() - .withEndTime(OffsetDateTime.parse("2020-01-01T12:34:56.999Z")) - .withScheduleStatus(ScheduleStatus.DISABLED) - .withStartTime(OffsetDateTime.parse("2020-01-01T12:34:56.999Z")) - .withTimeZone("string") - .withExpression("string")) .withServices( mapOf( "string", @@ -2447,7 +2554,7 @@ public final class JobsCreateOrUpdateSamples { .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) .withUri("string"))) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -2461,23 +2568,20 @@ public final class JobsCreateOrUpdateSamples { 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)"))) - .withDataSettings( - new ImageVerticalDataSettings() - .withTargetColumnName("string") - .withTrainingData( - new TrainingDataSettings().withData(new MLTableJobInput().withUri("string")))) .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) .create(); } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/SweepJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -2526,7 +2630,7 @@ public final class JobsCreateOrUpdateSamples { .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -2542,7 +2646,7 @@ public final class JobsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/PipelineJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -2587,7 +2691,7 @@ public final class JobsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/CommandJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -2632,7 +2736,7 @@ public final class JobsCreateOrUpdateSamples { .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) .withUri("string"))) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -2668,7 +2772,7 @@ import com.azure.core.util.Context; /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/delete.json */ /** * Sample code: Delete Job. @@ -2689,7 +2793,7 @@ import com.azure.core.util.Context; /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/CommandJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/CommandJob/get.json */ /** * Sample code: Get Command Job. @@ -2701,7 +2805,7 @@ public final class JobsGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/AutoMLJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/AutoMLJob/get.json */ /** * Sample code: Get AutoML Job. @@ -2713,7 +2817,7 @@ public final class JobsGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/SweepJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/SweepJob/get.json */ /** * Sample code: Get Sweep Job. @@ -2725,7 +2829,7 @@ public final class JobsGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/PipelineJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/PipelineJob/get.json */ /** * Sample code: Get Pipeline Job. @@ -2746,7 +2850,7 @@ import com.azure.core.util.Context; /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/CommandJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/CommandJob/list.json */ /** * Sample code: List Command Job. @@ -2758,7 +2862,7 @@ public final class JobsListSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/PipelineJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/PipelineJob/list.json */ /** * Sample code: List Pipeline Job. @@ -2770,7 +2874,7 @@ public final class JobsListSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/SweepJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/SweepJob/list.json */ /** * Sample code: List Sweep Job. @@ -2782,7 +2886,7 @@ public final class JobsListSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/AutoMLJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/AutoMLJob/list.json */ /** * Sample code: List AutoML Job. @@ -2795,17 +2899,231 @@ public final class JobsListSamples { } ``` +### LabelingJobs_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.LabelCategory; +import com.azure.resourcemanager.machinelearning.models.LabelClass; +import com.azure.resourcemanager.machinelearning.models.LabelingJobImageProperties; +import com.azure.resourcemanager.machinelearning.models.LabelingJobInstructions; +import com.azure.resourcemanager.machinelearning.models.LabelingJobProperties; +import com.azure.resourcemanager.machinelearning.models.MLAssistConfigurationEnabled; +import java.util.HashMap; +import java.util.Map; + +/** Samples for LabelingJobs CreateOrUpdate. */ +public final class LabelingJobsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateLabelingJob( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .labelingJobs() + .define("testLabelingJob") + .withExistingWorkspace("workspace-1234", "testworkspace") + .withProperties( + new LabelingJobProperties() + .withDescription("string") + .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withJobInstructions(new LabelingJobInstructions().withUri("link/to/instructions")) + .withLabelCategories( + mapOf( + "myCategory1", + new LabelCategory() + .withClasses( + mapOf( + "myLabelClass1", + new LabelClass().withDisplayName("myLabelClass1").withSubclasses(mapOf()), + "myLabelClass2", + new LabelClass().withDisplayName("myLabelClass2").withSubclasses(mapOf()))) + .withDisplayName("myCategory1Title") + .withMultiSelectEnabled(true), + "myCategory2", + new LabelCategory() + .withClasses( + mapOf( + "myLabelClass1", + new LabelClass().withDisplayName("myLabelClass1").withSubclasses(mapOf()), + "myLabelClass2", + new LabelClass().withDisplayName("myLabelClass2").withSubclasses(mapOf()))) + .withDisplayName("myCategory2Title") + .withMultiSelectEnabled(true))) + .withLabelingJobMediaProperties(new LabelingJobImageProperties()) + .withMlAssistConfiguration( + new MLAssistConfigurationEnabled() + .withInferencingComputeBinding( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute") + .withTrainingComputeBinding( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute"))) + .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; + } +} +``` + +### LabelingJobs_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for LabelingJobs Delete. */ +public final class LabelingJobsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/delete.json + */ + /** + * Sample code: Delete Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().deleteWithResponse("workspace-1234", "testworkspace", "testLabelingJob", Context.NONE); + } +} +``` + +### LabelingJobs_ExportLabels + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.models.DatasetExportSummary; + +/** Samples for LabelingJobs ExportLabels. */ +public final class LabelingJobsExportLabelsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/exportLabels.json + */ + /** + * Sample code: ExportLabels Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void exportLabelsLabelingJob( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .labelingJobs() + .exportLabels( + "workspace-1234", "testworkspace", "testLabelingJob", new DatasetExportSummary(), Context.NONE); + } +} +``` + +### LabelingJobs_Get + +```java +import com.azure.core.util.Context; + +/** Samples for LabelingJobs Get. */ +public final class LabelingJobsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/get.json + */ + /** + * Sample code: Get Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .labelingJobs() + .getWithResponse("workspace-1234", "testworkspace", "testLabelingJob", true, true, Context.NONE); + } +} +``` + +### LabelingJobs_List + +```java +import com.azure.core.util.Context; + +/** Samples for LabelingJobs List. */ +public final class LabelingJobsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/list.json + */ + /** + * Sample code: List Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().list("workspace-1234", "testworkspace", null, 10, Context.NONE); + } +} +``` + +### LabelingJobs_Pause + +```java +import com.azure.core.util.Context; + +/** Samples for LabelingJobs Pause. */ +public final class LabelingJobsPauseSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/pause.json + */ + /** + * Sample code: Pause Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void pauseLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().pauseWithResponse("workspace-1234", "testworkspace", "testLabelingJob", Context.NONE); + } +} +``` + +### LabelingJobs_Resume + +```java +import com.azure.core.util.Context; + +/** Samples for LabelingJobs Resume. */ +public final class LabelingJobsResumeSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/resume.json + */ + /** + * Sample code: Resume Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void resumeLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().resume("workspace-1234", "testworkspace", "testLabelingJob", Context.NONE); + } +} +``` + ### ModelContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.ModelContainerDetails; +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/preview/2022-02-01-preview/examples/ModelContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Model Container. @@ -2819,7 +3137,7 @@ public final class ModelContainersCreateOrUpdateSamples { .define("testContainer") .withExistingWorkspace("testrg123", "workspace123") .withProperties( - new ModelContainerDetails() + new ModelContainerProperties() .withDescription("Model container description") .withTags(mapOf("tag1", "value1", "tag2", "value2"))) .create(); @@ -2846,7 +3164,7 @@ import com.azure.core.util.Context; /** Samples for ModelContainers Delete. */ public final class ModelContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelContainer/delete.json */ /** * Sample code: Delete Model Container. @@ -2867,7 +3185,7 @@ import com.azure.core.util.Context; /** Samples for ModelContainers Get. */ public final class ModelContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelContainer/get.json */ /** * Sample code: Get Model Container. @@ -2888,7 +3206,7 @@ import com.azure.core.util.Context; /** Samples for ModelContainers List. */ public final class ModelContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelContainer/list.json */ /** * Sample code: List Model Container. @@ -2905,15 +3223,14 @@ public final class ModelContainersListSamples { ```java import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionDetails; +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/preview/2022-02-01-preview/examples/ModelVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Model Version. @@ -2927,13 +3244,13 @@ public final class ModelVersionsCreateOrUpdateSamples { .define("string") .withExistingModel("test-rg", "my-aml-workspace", "string") .withProperties( - new ModelVersionDetails() + new ModelVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType(ModelType.CUSTOM_MODEL) + .withModelType("CustomModel") .withModelUri("string")) .create(); } @@ -2959,7 +3276,7 @@ import com.azure.core.util.Context; /** Samples for ModelVersions Delete. */ public final class ModelVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelVersion/delete.json */ /** * Sample code: Delete Model Version. @@ -2980,7 +3297,7 @@ import com.azure.core.util.Context; /** Samples for ModelVersions Get. */ public final class ModelVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelVersion/get.json */ /** * Sample code: Get Model Version. @@ -3001,7 +3318,7 @@ import com.azure.core.util.Context; /** Samples for ModelVersions List. */ public final class ModelVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelVersion/list.json */ /** * Sample code: List Model Version. @@ -3053,7 +3370,7 @@ import java.util.Map; /** Samples for OnlineDeployments CreateOrUpdate. */ public final class OnlineDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Kubernetes Online Deployment. @@ -3117,7 +3434,7 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Managed Online Deployment. @@ -3199,7 +3516,7 @@ import com.azure.core.util.Context; /** Samples for OnlineDeployments Delete. */ public final class OnlineDeploymentsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/delete.json */ /** * Sample code: Delete Online Deployment. @@ -3221,7 +3538,7 @@ import com.azure.core.util.Context; /** Samples for OnlineDeployments Get. */ public final class OnlineDeploymentsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json */ /** * Sample code: Get Kubernetes Online Deployment. @@ -3236,7 +3553,7 @@ public final class OnlineDeploymentsGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json */ /** * Sample code: Get Managed Online Deployment. @@ -3262,7 +3579,7 @@ import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; /** Samples for OnlineDeployments GetLogs. */ public final class OnlineDeploymentsGetLogsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/getLogs.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/getLogs.json */ /** * Sample code: Get Online Deployment Logs. @@ -3292,7 +3609,7 @@ import com.azure.core.util.Context; /** Samples for OnlineDeployments List. */ public final class OnlineDeploymentsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/list.json */ /** * Sample code: List Online Deployments. @@ -3315,7 +3632,7 @@ import com.azure.core.util.Context; /** Samples for OnlineDeployments ListSkus. */ public final class OnlineDeploymentsListSkusSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json */ /** * Sample code: List Managed Online Deployment Skus. @@ -3330,7 +3647,7 @@ public final class OnlineDeploymentsListSkusSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json */ /** * Sample code: List Kubernetes Online Deployment Skus. @@ -3349,24 +3666,17 @@ public final class OnlineDeploymentsListSkusSamples { ### OnlineDeployments_Update ```java -import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentData; -import com.azure.resourcemanager.machinelearning.models.PartialKubernetesOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialManagedOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; import com.azure.resourcemanager.machinelearning.models.PartialSku; import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.io.IOException; import java.util.HashMap; import java.util.Map; /** Samples for OnlineDeployments Update. */ public final class OnlineDeploymentsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json */ /** * Sample code: Update Managed Online Deployment. @@ -3374,8 +3684,8 @@ public final class OnlineDeploymentsUpdateSamples { * @param manager Entry point to MachineLearningManager. */ public static void updateManagedOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - OnlineDeploymentData resource = + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + OnlineDeployment resource = manager .onlineDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) @@ -3383,17 +3693,6 @@ public final class OnlineDeploymentsUpdateSamples { resource .update() .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialManagedOnlineDeployment()) .withSku( new PartialSku() .withCapacity(1) @@ -3405,7 +3704,7 @@ public final class OnlineDeploymentsUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json */ /** * Sample code: Update Kubernetes Online Deployment. @@ -3413,8 +3712,8 @@ public final class OnlineDeploymentsUpdateSamples { * @param manager Entry point to MachineLearningManager. */ public static void updateKubernetesOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - OnlineDeploymentData resource = + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + OnlineDeployment resource = manager .onlineDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) @@ -3422,17 +3721,6 @@ public final class OnlineDeploymentsUpdateSamples { resource .update() .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialKubernetesOnlineDeployment()) .withSku( new PartialSku() .withCapacity(1) @@ -3462,7 +3750,7 @@ public final class OnlineDeploymentsUpdateSamples { import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointDetails; +import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; @@ -3472,7 +3760,7 @@ import java.util.Map; /** Samples for OnlineEndpoints CreateOrUpdate. */ public final class OnlineEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Online Endpoint. @@ -3487,7 +3775,7 @@ public final class OnlineEndpointsCreateOrUpdateSamples { .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new OnlineEndpointDetails() + new OnlineEndpointProperties() .withAuthMode(EndpointAuthMode.AMLTOKEN) .withDescription("string") .withProperties(mapOf("string", "string")) @@ -3530,7 +3818,7 @@ import com.azure.core.util.Context; /** Samples for OnlineEndpoints Delete. */ public final class OnlineEndpointsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/delete.json */ /** * Sample code: Delete Online Endpoint. @@ -3551,7 +3839,7 @@ import com.azure.core.util.Context; /** Samples for OnlineEndpoints Get. */ public final class OnlineEndpointsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/get.json */ /** * Sample code: Get Online Endpoint. @@ -3572,7 +3860,7 @@ import com.azure.core.util.Context; /** Samples for OnlineEndpoints GetToken. */ public final class OnlineEndpointsGetTokenSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/getToken.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/getToken.json */ /** * Sample code: GetToken Online Endpoint. @@ -3596,7 +3884,7 @@ import com.azure.resourcemanager.machinelearning.models.OrderString; /** Samples for OnlineEndpoints List. */ public final class OnlineEndpointsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/list.json */ /** * Sample code: List Online Endpoint. @@ -3629,7 +3917,7 @@ import com.azure.core.util.Context; /** Samples for OnlineEndpoints ListKeys. */ public final class OnlineEndpointsListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/listKeys.json */ /** * Sample code: ListKeys Online Endpoint. @@ -3653,7 +3941,7 @@ import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRe /** Samples for OnlineEndpoints RegenerateKeys. */ public final class OnlineEndpointsRegenerateKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/regenerateKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Online Endpoint. @@ -3681,11 +3969,8 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointData; +import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -3693,7 +3978,7 @@ import java.util.Map; /** Samples for OnlineEndpoints Update. */ public final class OnlineEndpointsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/update.json */ /** * Sample code: Update Online Endpoint. @@ -3702,7 +3987,7 @@ public final class OnlineEndpointsUpdateSamples { */ public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - OnlineEndpointData resource = + OnlineEndpoint resource = manager .onlineEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE) @@ -3719,15 +4004,6 @@ public final class OnlineEndpointsUpdateSamples { SerializerFactory .createDefaultManagementSerializerAdapter() .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialOnlineEndpoint().withTraffic(mapOf("string", 1))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) .apply(); } @@ -3752,7 +4028,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/operationsList.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/operationsList.json */ /** * Sample code: OperationsList. @@ -3774,7 +4050,7 @@ import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnec /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json */ /** * Sample code: WorkspacePutPrivateEndpointConnection. @@ -3804,7 +4080,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateEndpointConnection/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateEndpointConnection/delete.json */ /** * Sample code: WorkspaceDeletePrivateEndpointConnection. @@ -3828,7 +4104,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateEndpointConnection/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateEndpointConnection/get.json */ /** * Sample code: WorkspaceGetPrivateEndpointConnection. @@ -3852,7 +4128,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateEndpointConnection/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. @@ -3874,7 +4150,7 @@ import com.azure.core.util.Context; /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateLinkResource/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateLinkResource/list.json */ /** * Sample code: WorkspaceListPrivateLinkResources. @@ -3896,7 +4172,7 @@ import com.azure.core.util.Context; /** Samples for Quotas List. */ public final class QuotasListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Quota/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Quota/list.json */ /** * Sample code: List workspace quotas by VMFamily. @@ -3922,7 +4198,7 @@ import java.util.Arrays; /** Samples for Quotas Update. */ public final class QuotasUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Quota/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Quota/update.json */ /** * Sample code: update quotas. @@ -3955,6 +4231,135 @@ public final class QuotasUpdateSamples { } ``` +### Schedules_CreateOrUpdate + +```java +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/preview/2022-06-01-preview/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; + } +} +``` + +### Schedules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Schedules Delete. */ +public final class SchedulesDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/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", Context.NONE); + } +} +``` + +### Schedules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Schedules Get. */ +public final class SchedulesGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/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", Context.NONE); + } +} +``` + +### Schedules_List + +```java +import com.azure.core.util.Context; + +/** Samples for Schedules List. */ +public final class SchedulesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/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, Context.NONE); + } +} +``` + ### Usages_List ```java @@ -3963,7 +4368,7 @@ import com.azure.core.util.Context; /** Samples for Usages List. */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Usage/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Usage/list.json */ /** * Sample code: List Usages. @@ -3984,7 +4389,7 @@ import com.azure.core.util.Context; /** Samples for VirtualMachineSizes List. */ public final class VirtualMachineSizesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/VirtualMachineSize/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. @@ -4000,10 +4405,13 @@ public final class VirtualMachineSizesListSamples { ### WorkspaceConnections_Create ```java +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/preview/2022-02-01-preview/examples/WorkspaceConnection/create.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -4016,10 +4424,10 @@ public final class WorkspaceConnectionsCreateSamples { .workspaceConnections() .define("connection-1") .withExistingWorkspace("resourceGroup-1", "workspace-1") - .withCategory("ACR") - .withTarget("www.facebook.com") - .withAuthType("PAT") - .withValue("secrets") + .withProperties( + new NoneAuthTypeWorkspaceConnectionProperties() + .withCategory(ConnectionCategory.CONTAINER_REGISTRY) + .withTarget("www.facebook.com")) .create(); } } @@ -4033,7 +4441,7 @@ import com.azure.core.util.Context; /** Samples for WorkspaceConnections Delete. */ public final class WorkspaceConnectionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/WorkspaceConnection/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. @@ -4057,7 +4465,7 @@ import com.azure.core.util.Context; /** Samples for WorkspaceConnections Get. */ public final class WorkspaceConnectionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/WorkspaceConnection/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. @@ -4079,7 +4487,7 @@ import com.azure.core.util.Context; /** Samples for WorkspaceConnections List. */ public final class WorkspaceConnectionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/WorkspaceConnection/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. @@ -4088,7 +4496,9 @@ public final class WorkspaceConnectionsListSamples { */ public static void listWorkspaceConnections( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceConnections().list("resourceGroup-1", "workspace-1", "www.facebook.com", "ACR", Context.NONE); + manager + .workspaceConnections() + .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", Context.NONE); } } ``` @@ -4101,7 +4511,7 @@ import com.azure.core.util.Context; /** Samples for WorkspaceFeatures List. */ public final class WorkspaceFeaturesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/WorkspaceFeature/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. @@ -4133,7 +4543,7 @@ import java.util.Map; /** Samples for Workspaces CreateOrUpdate. */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/create.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/create.json */ /** * Sample code: Create Workspace. @@ -4212,7 +4622,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. @@ -4237,7 +4647,7 @@ import java.util.Map; /** Samples for Workspaces Diagnose. */ public final class WorkspacesDiagnoseSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/diagnose.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. @@ -4286,7 +4696,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/get.json */ /** * Sample code: Get Workspace. @@ -4307,7 +4717,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listBySubscription.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. @@ -4329,7 +4739,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listByResourceGroup.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. @@ -4351,7 +4761,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ListKeys. */ public final class WorkspacesListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -4372,7 +4782,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ListNotebookAccessToken. */ public final class WorkspacesListNotebookAccessTokenSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listNotebookAccessToken.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. @@ -4393,7 +4803,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ListNotebookKeys. */ public final class WorkspacesListNotebookKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Notebook/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -4414,7 +4824,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. */ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ExternalFQDN/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. @@ -4438,7 +4848,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ListStorageAccountKeys. */ public final class WorkspacesListStorageAccountKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listStorageAccountKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. @@ -4459,7 +4869,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces PrepareNotebook. */ public final class WorkspacesPrepareNotebookSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Notebook/prepare.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. @@ -4480,7 +4890,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ResyncKeys. */ public final class WorkspacesResyncKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/resyncKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. @@ -4503,7 +4913,7 @@ import com.azure.resourcemanager.machinelearning.models.Workspace; /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/update.json */ /** * Sample code: Update Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml index 146eb972d8342..a3c9e95489f0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Machine Learning Management - This package contains Microsoft Azure SDK for Machine Learning Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2022-02-01-preview. + This package contains Microsoft Azure SDK for Machine Learning Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-preview-2022-06. https://github.com/Azure/azure-sdk-for-java 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 index 763294717f948..51765905c9499 100644 --- 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 @@ -38,6 +38,7 @@ 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.LabelingJobsImpl; import com.azure.resourcemanager.machinelearning.implementation.ModelContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.ModelVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsImpl; @@ -46,6 +47,7 @@ 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; @@ -64,6 +66,7 @@ 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.LabelingJobs; import com.azure.resourcemanager.machinelearning.models.ModelContainers; import com.azure.resourcemanager.machinelearning.models.ModelVersions; import com.azure.resourcemanager.machinelearning.models.OnlineDeployments; @@ -72,6 +75,7 @@ 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; @@ -131,6 +135,8 @@ public final class MachineLearningManager { private Jobs jobs; + private LabelingJobs labelingJobs; + private ModelContainers modelContainers; private ModelVersions modelVersions; @@ -139,6 +145,8 @@ public final class MachineLearningManager { private OnlineDeployments onlineDeployments; + private Schedules schedules; + private WorkspaceFeatures workspaceFeatures; private final AzureMachineLearningWorkspaces clientObject; @@ -306,7 +314,7 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf .append("-") .append("com.azure.resourcemanager.machinelearning") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -461,7 +469,8 @@ public PrivateLinkResources privateLinkResources() { } /** - * Gets the resource collection API of WorkspaceConnections. It manages WorkspaceConnection. + * Gets the resource collection API of WorkspaceConnections. It manages + * WorkspaceConnectionPropertiesV2BasicResource. * * @return Resource collection API of WorkspaceConnections. */ @@ -473,7 +482,7 @@ public WorkspaceConnections workspaceConnections() { } /** - * Gets the resource collection API of BatchEndpoints. It manages BatchEndpointData. + * Gets the resource collection API of BatchEndpoints. It manages BatchEndpoint. * * @return Resource collection API of BatchEndpoints. */ @@ -485,7 +494,7 @@ public BatchEndpoints batchEndpoints() { } /** - * Gets the resource collection API of BatchDeployments. It manages BatchDeploymentData. + * Gets the resource collection API of BatchDeployments. It manages BatchDeployment. * * @return Resource collection API of BatchDeployments. */ @@ -497,7 +506,7 @@ public BatchDeployments batchDeployments() { } /** - * Gets the resource collection API of CodeContainers. It manages CodeContainerData. + * Gets the resource collection API of CodeContainers. It manages CodeContainer. * * @return Resource collection API of CodeContainers. */ @@ -509,7 +518,7 @@ public CodeContainers codeContainers() { } /** - * Gets the resource collection API of CodeVersions. It manages CodeVersionData. + * Gets the resource collection API of CodeVersions. It manages CodeVersion. * * @return Resource collection API of CodeVersions. */ @@ -521,7 +530,7 @@ public CodeVersions codeVersions() { } /** - * Gets the resource collection API of ComponentContainers. It manages ComponentContainerData. + * Gets the resource collection API of ComponentContainers. It manages ComponentContainer. * * @return Resource collection API of ComponentContainers. */ @@ -533,7 +542,7 @@ public ComponentContainers componentContainers() { } /** - * Gets the resource collection API of ComponentVersions. It manages ComponentVersionData. + * Gets the resource collection API of ComponentVersions. It manages ComponentVersion. * * @return Resource collection API of ComponentVersions. */ @@ -545,7 +554,7 @@ public ComponentVersions componentVersions() { } /** - * Gets the resource collection API of DataContainers. It manages DataContainerData. + * Gets the resource collection API of DataContainers. It manages DataContainer. * * @return Resource collection API of DataContainers. */ @@ -557,7 +566,7 @@ public DataContainers dataContainers() { } /** - * Gets the resource collection API of DataVersions. It manages DataVersionBaseData. + * Gets the resource collection API of DataVersions. It manages DataVersionBase. * * @return Resource collection API of DataVersions. */ @@ -569,7 +578,7 @@ public DataVersions dataVersions() { } /** - * Gets the resource collection API of Datastores. It manages DatastoreData. + * Gets the resource collection API of Datastores. It manages Datastore. * * @return Resource collection API of Datastores. */ @@ -581,7 +590,7 @@ public Datastores datastores() { } /** - * Gets the resource collection API of EnvironmentContainers. It manages EnvironmentContainerData. + * Gets the resource collection API of EnvironmentContainers. It manages EnvironmentContainer. * * @return Resource collection API of EnvironmentContainers. */ @@ -593,7 +602,7 @@ public EnvironmentContainers environmentContainers() { } /** - * Gets the resource collection API of EnvironmentVersions. It manages EnvironmentVersionData. + * Gets the resource collection API of EnvironmentVersions. It manages EnvironmentVersion. * * @return Resource collection API of EnvironmentVersions. */ @@ -605,7 +614,7 @@ public EnvironmentVersions environmentVersions() { } /** - * Gets the resource collection API of Jobs. It manages JobBaseData. + * Gets the resource collection API of Jobs. It manages JobBase. * * @return Resource collection API of Jobs. */ @@ -617,7 +626,19 @@ public Jobs jobs() { } /** - * Gets the resource collection API of ModelContainers. It manages ModelContainerData. + * Gets the resource collection API of LabelingJobs. It manages LabelingJob. + * + * @return Resource collection API of LabelingJobs. + */ + public LabelingJobs labelingJobs() { + if (this.labelingJobs == null) { + this.labelingJobs = new LabelingJobsImpl(clientObject.getLabelingJobs(), this); + } + return labelingJobs; + } + + /** + * Gets the resource collection API of ModelContainers. It manages ModelContainer. * * @return Resource collection API of ModelContainers. */ @@ -629,7 +650,7 @@ public ModelContainers modelContainers() { } /** - * Gets the resource collection API of ModelVersions. It manages ModelVersionData. + * Gets the resource collection API of ModelVersions. It manages ModelVersion. * * @return Resource collection API of ModelVersions. */ @@ -641,7 +662,7 @@ public ModelVersions modelVersions() { } /** - * Gets the resource collection API of OnlineEndpoints. It manages OnlineEndpointData. + * Gets the resource collection API of OnlineEndpoints. It manages OnlineEndpoint. * * @return Resource collection API of OnlineEndpoints. */ @@ -653,7 +674,7 @@ public OnlineEndpoints onlineEndpoints() { } /** - * Gets the resource collection API of OnlineDeployments. It manages OnlineDeploymentData. + * Gets the resource collection API of OnlineDeployments. It manages OnlineDeployment. * * @return Resource collection API of OnlineDeployments. */ @@ -664,6 +685,18 @@ public OnlineDeployments onlineDeployments() { 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. * 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 index 431d49bfc7f19..549cd1e274ee0 100644 --- 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 @@ -191,6 +191,13 @@ public interface AzureMachineLearningWorkspaces { */ JobsClient getJobs(); + /** + * Gets the LabelingJobsClient object to access its operations. + * + * @return the LabelingJobsClient object. + */ + LabelingJobsClient getLabelingJobs(); + /** * Gets the ModelContainersClient object to access its operations. * @@ -219,6 +226,13 @@ public interface AzureMachineLearningWorkspaces { */ OnlineDeploymentsClient getOnlineDeployments(); + /** + * Gets the SchedulesClient object to access its operations. + * + * @return the SchedulesClient object. + */ + SchedulesClient getSchedules(); + /** * Gets the WorkspaceFeaturesClient object to access its operations. * 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 index cfc4d11cfdb4e..547a679cd9186 100644 --- 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 @@ -11,8 +11,8 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialTrackedResource; +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 { @@ -28,7 +28,7 @@ public interface BatchDeploymentsClient { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); /** * Lists Batch inference deployments in the workspace. @@ -46,7 +46,7 @@ public interface BatchDeploymentsClient { * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String endpointName, @@ -131,7 +131,7 @@ void delete( * @return a batch inference deployment by id. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentDataInner get( + BatchDeploymentInner get( String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** @@ -148,7 +148,7 @@ BatchDeploymentDataInner get( * @return a batch inference deployment by id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); /** @@ -165,12 +165,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentDataInner> beginUpdate( + SyncPoller, BatchDeploymentInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body); + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); /** * Update a batch inference deployment (asynchronous). @@ -187,12 +187,12 @@ SyncPoller, BatchDeploymentDataInner> begin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentDataInner> beginUpdate( + SyncPoller, BatchDeploymentInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context); /** @@ -209,12 +209,12 @@ SyncPoller, BatchDeploymentDataInner> begin * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentDataInner update( + BatchDeploymentInner update( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body); + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); /** * Update a batch inference deployment (asynchronous). @@ -231,12 +231,12 @@ BatchDeploymentDataInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentDataInner update( + BatchDeploymentInner update( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context); /** @@ -253,12 +253,12 @@ BatchDeploymentDataInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentDataInner> beginCreateOrUpdate( + SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body); + BatchDeploymentInner body); /** * Creates/updates a batch inference deployment (asynchronous). @@ -275,12 +275,12 @@ SyncPoller, BatchDeploymentDataInner> begin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentDataInner> beginCreateOrUpdate( + SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body, + BatchDeploymentInner body, Context context); /** @@ -297,12 +297,12 @@ SyncPoller, BatchDeploymentDataInner> begin * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentDataInner createOrUpdate( + BatchDeploymentInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body); + BatchDeploymentInner body); /** * Creates/updates a batch inference deployment (asynchronous). @@ -319,11 +319,11 @@ BatchDeploymentDataInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentDataInner createOrUpdate( + BatchDeploymentInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body, + 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 index 5b61e1422061f..df3d62f874367 100644 --- 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 @@ -11,9 +11,9 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpointPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; /** An instance of this class provides access to all the operations defined in BatchEndpointsClient. */ public interface BatchEndpointsClient { @@ -28,7 +28,7 @@ public interface BatchEndpointsClient { * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * Lists Batch inference endpoint in the workspace. @@ -44,7 +44,7 @@ public interface BatchEndpointsClient { * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, Integer count, String skip, Context context); /** @@ -116,7 +116,7 @@ SyncPoller, Void> beginDelete( * @return a batch inference endpoint by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName); + BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); /** * Gets a batch inference endpoint by name. @@ -131,7 +131,7 @@ SyncPoller, Void> beginDelete( * @return a batch inference endpoint by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context); /** @@ -147,11 +147,11 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointDataInner> beginUpdate( + SyncPoller, BatchEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body); + PartialMinimalTrackedResourceWithIdentity body); /** * Update a batch inference endpoint (asynchronous). @@ -167,11 +167,11 @@ SyncPoller, BatchEndpointDataInner> beginUpda * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointDataInner> beginUpdate( + SyncPoller, BatchEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context); /** @@ -187,11 +187,11 @@ SyncPoller, BatchEndpointDataInner> beginUpda * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointDataInner update( + BatchEndpointInner update( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body); + PartialMinimalTrackedResourceWithIdentity body); /** * Update a batch inference endpoint (asynchronous). @@ -207,11 +207,11 @@ BatchEndpointDataInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointDataInner update( + BatchEndpointInner update( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context); /** @@ -227,8 +227,8 @@ BatchEndpointDataInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body); + SyncPoller, BatchEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body); /** * Creates a batch inference endpoint (asynchronous). @@ -244,12 +244,8 @@ SyncPoller, BatchEndpointDataInner> beginCrea * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context); + SyncPoller, BatchEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context); /** * Creates a batch inference endpoint (asynchronous). @@ -264,8 +260,8 @@ SyncPoller, BatchEndpointDataInner> beginCrea * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body); + BatchEndpointInner createOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body); /** * Creates a batch inference endpoint (asynchronous). @@ -281,12 +277,8 @@ BatchEndpointDataInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context); + BatchEndpointInner createOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context); /** * Lists batch Inference Endpoint keys. 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 index 03d7ba0721bec..84e54dd52dfb2 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; +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 { @@ -24,7 +24,7 @@ public interface CodeContainersClient { * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List containers. @@ -39,7 +39,7 @@ public interface CodeContainersClient { * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, Context context); /** @@ -82,7 +82,7 @@ PagedIterable list( * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerDataInner get(String resourceGroupName, String workspaceName, String name); + CodeContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -97,7 +97,7 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -113,8 +113,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body); + CodeContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body); /** * Create or update container. @@ -130,6 +130,6 @@ CodeContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java index da65902f46c42..6284f9bdcd46d 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; +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 { @@ -25,7 +25,7 @@ public interface CodeVersionsClient { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List versions. @@ -43,7 +43,7 @@ public interface CodeVersionsClient { * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -96,7 +96,7 @@ Response deleteWithResponse( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version); + CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -112,7 +112,7 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -129,8 +129,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionDataInner body); + CodeVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body); /** * Create or update version. @@ -147,11 +147,11 @@ CodeVersionDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - CodeVersionDataInner body, + CodeVersionInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java index eb2edf8ff6813..2a80c62225570 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in ComponentContainersClient. */ @@ -25,7 +25,7 @@ public interface ComponentContainersClient { * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List component containers. @@ -41,7 +41,7 @@ public interface ComponentContainersClient { * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); /** @@ -84,7 +84,7 @@ PagedIterable list( * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerDataInner get(String resourceGroupName, String workspaceName, String name); + ComponentContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -99,7 +99,7 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -115,8 +115,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner body); + ComponentContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body); /** * Create or update container. @@ -132,6 +132,6 @@ ComponentContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner body, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java index a1f3e0bae9ecb..a3da844db0a62 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in ComponentVersionsClient. */ @@ -26,7 +26,7 @@ public interface ComponentVersionsClient { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List component versions. @@ -45,7 +45,7 @@ public interface ComponentVersionsClient { * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -99,7 +99,7 @@ Response deleteWithResponse( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version); + ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -115,7 +115,7 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -132,8 +132,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionDataInner body); + ComponentVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body); /** * Create or update version. @@ -150,11 +150,11 @@ ComponentVersionDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - ComponentVersionDataInner body, + ComponentVersionInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java index 59109ed677d35..38d7965a7ea4e 100644 --- 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 @@ -15,7 +15,10 @@ 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.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; +import java.util.List; /** An instance of this class provides access to all the operations defined in ComputesClient. */ public interface ComputesClient { @@ -318,6 +321,42 @@ void delete( UnderlyingResourceAction underlyingResourceAction, Context context); + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateCustomServices( + String resourceGroupName, String workspaceName, String computeName, List customServices); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 updateCustomServicesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + List customServices, + Context context); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -552,4 +591,40 @@ SyncPoller, Void> beginRestart( */ @ServiceMethod(returns = ReturnType.SINGLE) void restart(String resourceGroupName, String workspaceName, String computeName, Context context); + + /** + * Updates the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateIdleShutdownSetting( + String resourceGroupName, String workspaceName, String computeName, IdleShutdownSetting parameters); + + /** + * Updates the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 updateIdleShutdownSettingWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + IdleShutdownSetting parameters, + 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 index 533a6f679bbbb..bcb3faa55ed8c 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in DataContainersClient. */ @@ -25,7 +25,7 @@ public interface DataContainersClient { * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List data containers. @@ -41,7 +41,7 @@ public interface DataContainersClient { * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); /** @@ -84,7 +84,7 @@ PagedIterable list( * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerDataInner get(String resourceGroupName, String workspaceName, String name); + DataContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -99,7 +99,7 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -115,8 +115,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body); + DataContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, DataContainerInner body); /** * Create or update container. @@ -132,6 +132,6 @@ DataContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java index f7aa9b60dbda8..e83b7a4f1a0ad 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in DataVersionsClient. */ @@ -26,7 +26,7 @@ public interface DataVersionsClient { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List data versions in the data container. @@ -48,7 +48,7 @@ public interface DataVersionsClient { * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -103,7 +103,7 @@ Response deleteWithResponse( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseDataInner get(String resourceGroupName, String workspaceName, String name, String version); + DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -119,7 +119,7 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -136,8 +136,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseDataInner body); + DataVersionBaseInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body); /** * Create or update version. @@ -154,11 +154,11 @@ DataVersionBaseDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - DataVersionBaseDataInner body, + DataVersionBaseInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java index 039579d9f50f2..ae4a5f982a28f 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; import java.util.List; @@ -26,7 +26,7 @@ public interface DatastoresClient { * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List datastores. @@ -47,7 +47,7 @@ public interface DatastoresClient { * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -99,7 +99,7 @@ PagedIterable list( * @return datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreDataInner get(String resourceGroupName, String workspaceName, String name); + DatastoreInner get(String resourceGroupName, String workspaceName, String name); /** * Get datastore. @@ -114,7 +114,7 @@ PagedIterable list( * @return datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -130,8 +130,7 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body); + DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, DatastoreInner body); /** * Create or update datastore. @@ -148,11 +147,11 @@ DatastoreDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, - DatastoreDataInner body, + DatastoreInner body, Boolean skipValidation, Context context); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java index 2585f01d46cdd..8444385bf89ec 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in EnvironmentContainersClient. */ @@ -25,7 +25,7 @@ public interface EnvironmentContainersClient { * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List environment containers. @@ -41,7 +41,7 @@ public interface EnvironmentContainersClient { * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); /** @@ -84,7 +84,7 @@ PagedIterable list( * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerDataInner get(String resourceGroupName, String workspaceName, String name); + EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -99,7 +99,7 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -115,8 +115,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerDataInner body); + EnvironmentContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body); /** * Create or update container. @@ -132,10 +132,6 @@ EnvironmentContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - EnvironmentContainerDataInner body, - Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java index ee7be12767add..2f4805271c2cb 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in EnvironmentVersionsClient. */ @@ -26,7 +26,7 @@ public interface EnvironmentVersionsClient { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List versions. @@ -45,7 +45,7 @@ public interface EnvironmentVersionsClient { * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -99,7 +99,7 @@ Response deleteWithResponse( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version); + EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -115,7 +115,7 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -132,8 +132,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionDataInner body); + EnvironmentVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body); /** * Creates or updates an EnvironmentVersion. @@ -150,11 +150,11 @@ EnvironmentVersionDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - EnvironmentVersionDataInner body, + EnvironmentVersionInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java index 6d280d7c1f6f9..bd950bf0f9ed4 100644 --- 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 @@ -11,7 +11,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in JobsClient. */ @@ -27,7 +27,7 @@ public interface JobsClient { * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * Lists Jobs in the workspace. @@ -47,7 +47,7 @@ public interface JobsClient { * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -127,7 +127,7 @@ SyncPoller, Void> beginDelete( * @return a Job by name/id. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseDataInner get(String resourceGroupName, String workspaceName, String id); + JobBaseInner get(String resourceGroupName, String workspaceName, String id); /** * Gets a Job by name/id. @@ -142,8 +142,7 @@ SyncPoller, Void> beginDelete( * @return a Job by name/id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String id, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); /** * Creates and executes a Job. @@ -158,7 +157,7 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseDataInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseDataInner body); + JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body); /** * Creates and executes a Job. @@ -174,11 +173,41 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String id, JobBaseInner body, 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. + * @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. + * 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. @@ -191,7 +220,7 @@ Response createOrUpdateWithResponse( void cancel(String resourceGroupName, String workspaceName, String id); /** - * Cancels a Job. + * 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. @@ -200,8 +229,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + 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/LabelingJobsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/LabelingJobsClient.java new file mode 100644 index 0000000000000..40f878da75f98 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/LabelingJobsClient.java @@ -0,0 +1,328 @@ +// Copyright (c) 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.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; + +/** An instance of this class provides access to all the operations defined in LabelingJobsClient. */ +public interface LabelingJobsClient { + /** + * Lists labeling 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 LabelingJob entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists labeling 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 count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context); + + /** + * Delete a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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); + + /** + * Delete a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 id, Context context); + + /** + * Gets a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobInner get(String resourceGroupName, String workspaceName, String id); + + /** + * Gets a labeling 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 LabelingJob. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String workspaceName, + String id, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context); + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LabelingJobInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body); + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LabelingJobInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body, Context context); + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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) + LabelingJobInner createOrUpdate(String resourceGroupName, String workspaceName, String id, LabelingJobInner body); + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobInner createOrUpdate( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body, Context context); + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, ExportSummaryInner> beginExportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body); + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, ExportSummaryInner> beginExportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context); + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ExportSummaryInner exportLabels(String resourceGroupName, String workspaceName, String id, ExportSummaryInner body); + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ExportSummaryInner exportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context); + + /** + * Pause a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 pause(String resourceGroupName, String workspaceName, String id); + + /** + * Pause a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 pauseWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + + /** + * Resume a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginResume(String resourceGroupName, String workspaceName, String id); + + /** + * Resume a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginResume( + String resourceGroupName, String workspaceName, String id, Context context); + + /** + * Resume a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resume(String resourceGroupName, String workspaceName, String id); + + /** + * Resume a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resume(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 index 78142802c0e57..28a7cd2b51f63 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in ModelContainersClient. */ @@ -25,7 +25,7 @@ public interface ModelContainersClient { * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List model containers. @@ -42,7 +42,7 @@ public interface ModelContainersClient { * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -90,7 +90,7 @@ PagedIterable list( * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerDataInner get(String resourceGroupName, String workspaceName, String name); + ModelContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -105,7 +105,7 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -121,8 +121,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body); + ModelContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body); /** * Create or update container. @@ -138,6 +138,6 @@ ModelContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java index 317537e9c8439..0a3bd35fca246 100644 --- 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 @@ -9,7 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in ModelVersionsClient. */ @@ -26,7 +26,7 @@ public interface ModelVersionsClient { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List model versions. @@ -51,7 +51,7 @@ public interface ModelVersionsClient { * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -111,7 +111,7 @@ Response deleteWithResponse( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version); + ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -127,7 +127,7 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -144,8 +144,8 @@ Response getWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionDataInner body); + ModelVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body); /** * Create or update version. @@ -162,11 +162,11 @@ ModelVersionDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - ModelVersionDataInner body, + ModelVersionInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java index 46bea196ac72d..149ff167d4323 100644 --- 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 @@ -12,10 +12,10 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineDeploymentPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; /** An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. */ public interface OnlineDeploymentsClient { @@ -31,7 +31,7 @@ public interface OnlineDeploymentsClient { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); /** * List Inference Endpoint Deployments. @@ -49,7 +49,7 @@ public interface OnlineDeploymentsClient { * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String endpointName, @@ -134,7 +134,7 @@ void delete( * @return inference Deployment Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentDataInner get( + OnlineDeploymentInner get( String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** @@ -151,7 +151,7 @@ OnlineDeploymentDataInner get( * @return inference Deployment Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); /** @@ -168,12 +168,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentDataInner> beginUpdate( + SyncPoller, OnlineDeploymentInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body); + PartialMinimalTrackedResourceWithSku body); /** * Update Online Deployment (asynchronous). @@ -190,12 +190,12 @@ SyncPoller, OnlineDeploymentDataInner> beg * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentDataInner> beginUpdate( + SyncPoller, OnlineDeploymentInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body, + PartialMinimalTrackedResourceWithSku body, Context context); /** @@ -212,12 +212,12 @@ SyncPoller, OnlineDeploymentDataInner> beg * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentDataInner update( + OnlineDeploymentInner update( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body); + PartialMinimalTrackedResourceWithSku body); /** * Update Online Deployment (asynchronous). @@ -234,12 +234,12 @@ OnlineDeploymentDataInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentDataInner update( + OnlineDeploymentInner update( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body, + PartialMinimalTrackedResourceWithSku body, Context context); /** @@ -256,12 +256,12 @@ OnlineDeploymentDataInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentDataInner> beginCreateOrUpdate( + SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body); + OnlineDeploymentInner body); /** * Create or update Inference Endpoint Deployment (asynchronous). @@ -278,12 +278,12 @@ SyncPoller, OnlineDeploymentDataInner> beg * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentDataInner> beginCreateOrUpdate( + SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body, + OnlineDeploymentInner body, Context context); /** @@ -300,12 +300,12 @@ SyncPoller, OnlineDeploymentDataInner> beg * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentDataInner createOrUpdate( + OnlineDeploymentInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body); + OnlineDeploymentInner body); /** * Create or update Inference Endpoint Deployment (asynchronous). @@ -322,12 +322,12 @@ OnlineDeploymentDataInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentDataInner createOrUpdate( + OnlineDeploymentInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body, + OnlineDeploymentInner body, 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 index 7dfed8a382a26..afa0ac76816fc 100644 --- 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 @@ -13,10 +13,10 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; import com.azure.resourcemanager.machinelearning.models.OrderString; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineEndpointPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; /** An instance of this class provides access to all the operations defined in OnlineEndpointsClient. */ @@ -32,7 +32,7 @@ public interface OnlineEndpointsClient { * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List Online Endpoints. @@ -55,7 +55,7 @@ public interface OnlineEndpointsClient { * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -136,7 +136,7 @@ SyncPoller, Void> beginDelete( * @return online Endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName); + OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); /** * Get Online Endpoint. @@ -151,7 +151,7 @@ SyncPoller, Void> beginDelete( * @return online Endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context); /** @@ -167,11 +167,11 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointDataInner> beginUpdate( + SyncPoller, OnlineEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body); + PartialMinimalTrackedResourceWithIdentity body); /** * Update Online Endpoint (asynchronous). @@ -187,11 +187,11 @@ SyncPoller, OnlineEndpointDataInner> beginUp * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointDataInner> beginUpdate( + SyncPoller, OnlineEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context); /** @@ -207,11 +207,11 @@ SyncPoller, OnlineEndpointDataInner> beginUp * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointDataInner update( + OnlineEndpointInner update( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body); + PartialMinimalTrackedResourceWithIdentity body); /** * Update Online Endpoint (asynchronous). @@ -227,11 +227,11 @@ OnlineEndpointDataInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointDataInner update( + OnlineEndpointInner update( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context); /** @@ -247,8 +247,8 @@ OnlineEndpointDataInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body); + SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body); /** * Create or update Online Endpoint (asynchronous). @@ -264,12 +264,8 @@ SyncPoller, OnlineEndpointDataInner> beginCr * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointDataInner body, - Context context); + SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, Context context); /** * Create or update Online Endpoint (asynchronous). @@ -284,8 +280,8 @@ SyncPoller, OnlineEndpointDataInner> beginCr * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body); + OnlineEndpointInner createOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body); /** * Create or update Online Endpoint (asynchronous). @@ -301,12 +297,8 @@ OnlineEndpointDataInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointDataInner body, - Context context); + OnlineEndpointInner createOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. 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 new file mode 100644 index 0000000000000..9969ad7f77dfe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java @@ -0,0 +1,197 @@ +// Copyright (c) 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; + +/** 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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); + + /** + * 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); + + /** + * 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/WorkspaceConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java index 9f057a3dd81f8..a8fbefe654acc 100644 --- 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 @@ -9,79 +9,83 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; +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 { /** - * List all connections under a AML workspace. + * 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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceConnectionPropertiesV2BasicResourceInner create( + String resourceGroupName, + String workspaceName, + String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner parameters); /** - * List all connections under a AML workspace. + * 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 target Target of the workspace connection. - * @param category Category of the workspace connection. + * @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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse( + String resourceGroupName, + String workspaceName, + String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner parameters, + Context context); /** - * Add a new workspace connection. + * 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 parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionInner create( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters); + WorkspaceConnectionPropertiesV2BasicResourceInner get( + String resourceGroupName, String workspaceName, String connectionName); /** - * Add a new workspace connection. + * 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 parameters The object for creating or updating a new workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionInner parameters, - Context context); + Response getWithResponse( + String resourceGroupName, String workspaceName, String connectionName, Context context); /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -89,13 +93,12 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionInner get(String resourceGroupName, String workspaceName, String connectionName); + void delete(String resourceGroupName, String workspaceName, String connectionName); /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -104,38 +107,40 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response deleteWithResponse( String resourceGroupName, String workspaceName, String connectionName, Context context); /** - * Delete a workspace connection. + * 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 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 paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String connectionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName); /** - * Delete a workspace connection. + * 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 connectionName Friendly name of the workspace connection. + * @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 {@link Response}. + * @return the paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); + @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/models/BatchDeploymentDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java index 5df9352b3489c..2f9f079029f73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java @@ -8,25 +8,23 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentDetails; +import com.azure.resourcemanager.machinelearning.models.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 BatchDeploymentData model. */ +/** The BatchDeployment model. */ @Fluent -public final class BatchDeploymentDataInner extends Resource { +public final class BatchDeploymentInner extends Resource { /* - * Managed service identity (system assigned and/or user assigned - * identities) + * 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. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. */ @JsonProperty(value = "kind") private String kind; @@ -35,7 +33,7 @@ public final class BatchDeploymentDataInner extends Resource { * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private BatchDeploymentDetails properties; + private BatchDeploymentProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -44,8 +42,7 @@ public final class BatchDeploymentDataInner extends Resource { private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -63,9 +60,9 @@ public ManagedServiceIdentity identity() { * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * * @param identity the identity value to set. - * @return the BatchDeploymentDataInner object itself. + * @return the BatchDeploymentInner object itself. */ - public BatchDeploymentDataInner withIdentity(ManagedServiceIdentity identity) { + public BatchDeploymentInner withIdentity(ManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -85,9 +82,9 @@ public String kind() { * the same type. * * @param kind the kind value to set. - * @return the BatchDeploymentDataInner object itself. + * @return the BatchDeploymentInner object itself. */ - public BatchDeploymentDataInner withKind(String kind) { + public BatchDeploymentInner withKind(String kind) { this.kind = kind; return this; } @@ -97,7 +94,7 @@ public BatchDeploymentDataInner withKind(String kind) { * * @return the properties value. */ - public BatchDeploymentDetails properties() { + public BatchDeploymentProperties properties() { return this.properties; } @@ -105,9 +102,9 @@ public BatchDeploymentDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the BatchDeploymentDataInner object itself. + * @return the BatchDeploymentInner object itself. */ - public BatchDeploymentDataInner withProperties(BatchDeploymentDetails properties) { + public BatchDeploymentInner withProperties(BatchDeploymentProperties properties) { this.properties = properties; return this; } @@ -125,9 +122,9 @@ public Sku sku() { * Set the sku property: Sku details required for ARM contract for Autoscaling. * * @param sku the sku value to set. - * @return the BatchDeploymentDataInner object itself. + * @return the BatchDeploymentInner object itself. */ - public BatchDeploymentDataInner withSku(Sku sku) { + public BatchDeploymentInner withSku(Sku sku) { this.sku = sku; return this; } @@ -143,14 +140,14 @@ public SystemData systemData() { /** {@inheritDoc} */ @Override - public BatchDeploymentDataInner withLocation(String location) { + public BatchDeploymentInner withLocation(String location) { super.withLocation(location); return this; } /** {@inheritDoc} */ @Override - public BatchDeploymentDataInner withTags(Map tags) { + public BatchDeploymentInner withTags(Map tags) { super.withTags(tags); return this; } @@ -167,8 +164,7 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model BatchDeploymentDataInner")); + new IllegalArgumentException("Missing required property properties in model BatchDeploymentInner")); } else { properties().validate(); } @@ -177,5 +173,5 @@ public void validate() { } } - private static final ClientLogger LOGGER = new ClientLogger(BatchDeploymentDataInner.class); + 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/BatchEndpointDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java index 2dc693909a68e..1bb284793ff97 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java @@ -7,25 +7,23 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDetails; +import com.azure.resourcemanager.machinelearning.models.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 BatchEndpointData model. */ +/** The BatchEndpoint model. */ @Fluent -public final class BatchEndpointDataInner extends Resource { +public final class BatchEndpointInner extends Resource { /* - * Managed service identity (system assigned and/or user assigned - * identities) + * 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. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. */ @JsonProperty(value = "kind") private String kind; @@ -34,7 +32,7 @@ public final class BatchEndpointDataInner extends Resource { * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private BatchEndpointDetails properties; + private BatchEndpointProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -55,9 +53,9 @@ public ManagedServiceIdentity identity() { * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * * @param identity the identity value to set. - * @return the BatchEndpointDataInner object itself. + * @return the BatchEndpointInner object itself. */ - public BatchEndpointDataInner withIdentity(ManagedServiceIdentity identity) { + public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -77,9 +75,9 @@ public String kind() { * the same type. * * @param kind the kind value to set. - * @return the BatchEndpointDataInner object itself. + * @return the BatchEndpointInner object itself. */ - public BatchEndpointDataInner withKind(String kind) { + public BatchEndpointInner withKind(String kind) { this.kind = kind; return this; } @@ -89,7 +87,7 @@ public BatchEndpointDataInner withKind(String kind) { * * @return the properties value. */ - public BatchEndpointDetails properties() { + public BatchEndpointProperties properties() { return this.properties; } @@ -97,9 +95,9 @@ public BatchEndpointDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the BatchEndpointDataInner object itself. + * @return the BatchEndpointInner object itself. */ - public BatchEndpointDataInner withProperties(BatchEndpointDetails properties) { + public BatchEndpointInner withProperties(BatchEndpointProperties properties) { this.properties = properties; return this; } @@ -117,23 +115,23 @@ public Sku sku() { * Set the sku property: Sku details required for ARM contract for Autoscaling. * * @param sku the sku value to set. - * @return the BatchEndpointDataInner object itself. + * @return the BatchEndpointInner object itself. */ - public BatchEndpointDataInner withSku(Sku sku) { + public BatchEndpointInner withSku(Sku sku) { this.sku = sku; return this; } /** {@inheritDoc} */ @Override - public BatchEndpointDataInner withLocation(String location) { + public BatchEndpointInner withLocation(String location) { super.withLocation(location); return this; } /** {@inheritDoc} */ @Override - public BatchEndpointDataInner withTags(Map tags) { + public BatchEndpointInner withTags(Map tags) { super.withTags(tags); return this; } @@ -150,8 +148,7 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model BatchEndpointDataInner")); + new IllegalArgumentException("Missing required property properties in model BatchEndpointInner")); } else { properties().validate(); } @@ -160,5 +157,5 @@ public void validate() { } } - private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointDataInner.class); + 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/CodeContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java index 1b06f986e32fe..c826c060a19ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.CodeContainerDetails; +import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class CodeContainerDataInner extends ProxyResource { +public final class CodeContainerInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private CodeContainerDetails properties; + private CodeContainerProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class CodeContainerDataInner extends ProxyResource { * * @return the properties value. */ - public CodeContainerDetails properties() { + public CodeContainerProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public CodeContainerDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the CodeContainerDataInner object itself. + * @return the CodeContainerInner object itself. */ - public CodeContainerDataInner withProperties(CodeContainerDetails properties) { + public CodeContainerInner withProperties(CodeContainerProperties properties) { this.properties = properties; return this; } @@ -65,12 +64,11 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model CodeContainerDataInner")); + new IllegalArgumentException("Missing required property properties in model CodeContainerInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(CodeContainerDataInner.class); + 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/CodeVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java similarity index 82% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java index 1e72fd1951911..0e5e310d1d5a0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.CodeVersionDetails; +import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class CodeVersionDataInner extends ProxyResource { +public final class CodeVersionInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private CodeVersionDetails properties; + private CodeVersionProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class CodeVersionDataInner extends ProxyResource { * * @return the properties value. */ - public CodeVersionDetails properties() { + public CodeVersionProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public CodeVersionDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the CodeVersionDataInner object itself. + * @return the CodeVersionInner object itself. */ - public CodeVersionDataInner withProperties(CodeVersionDetails properties) { + public CodeVersionInner withProperties(CodeVersionProperties properties) { this.properties = properties; return this; } @@ -65,11 +64,11 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model CodeVersionDataInner")); + new IllegalArgumentException("Missing required property properties in model CodeVersionInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(CodeVersionDataInner.class); + 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/ComponentContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java similarity index 82% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java index c947da16fd561..b33d2b1d43e56 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerDetails; +import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class ComponentContainerDataInner extends ProxyResource { +public final class ComponentContainerInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private ComponentContainerDetails properties; + private ComponentContainerProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class ComponentContainerDataInner extends ProxyResource { * * @return the properties value. */ - public ComponentContainerDetails properties() { + public ComponentContainerProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public ComponentContainerDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the ComponentContainerDataInner object itself. + * @return the ComponentContainerInner object itself. */ - public ComponentContainerDataInner withProperties(ComponentContainerDetails properties) { + public ComponentContainerInner withProperties(ComponentContainerProperties properties) { this.properties = properties; return this; } @@ -66,11 +65,11 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model ComponentContainerDataInner")); + "Missing required property properties in model ComponentContainerInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ComponentContainerDataInner.class); + 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/ComponentVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java similarity index 82% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java index ba2ad30514b2f..9363d98a8ee67 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionDetails; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class ComponentVersionDataInner extends ProxyResource { +public final class ComponentVersionInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private ComponentVersionDetails properties; + private ComponentVersionProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class ComponentVersionDataInner extends ProxyResource { * * @return the properties value. */ - public ComponentVersionDetails properties() { + public ComponentVersionProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public ComponentVersionDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the ComponentVersionDataInner object itself. + * @return the ComponentVersionInner object itself. */ - public ComponentVersionDataInner withProperties(ComponentVersionDetails properties) { + public ComponentVersionInner withProperties(ComponentVersionProperties properties) { this.properties = properties; return this; } @@ -66,11 +65,11 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model ComponentVersionDataInner")); + "Missing required property properties in model ComponentVersionInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ComponentVersionDataInner.class); + 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 index 0f32186478b97..ae2ef65197d9f 100644 --- 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 @@ -43,8 +43,7 @@ public final class ComputeResourceInner extends ProxyResource { private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java index aafdd395ffc83..2e584b6942461 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.DataContainerDetails; +import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class DataContainerDataInner extends ProxyResource { +public final class DataContainerInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private DataContainerDetails properties; + private DataContainerProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class DataContainerDataInner extends ProxyResource { * * @return the properties value. */ - public DataContainerDetails properties() { + public DataContainerProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public DataContainerDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the DataContainerDataInner object itself. + * @return the DataContainerInner object itself. */ - public DataContainerDataInner withProperties(DataContainerDetails properties) { + public DataContainerInner withProperties(DataContainerProperties properties) { this.properties = properties; return this; } @@ -65,12 +64,11 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model DataContainerDataInner")); + new IllegalArgumentException("Missing required property properties in model DataContainerInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(DataContainerDataInner.class); + 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/DataVersionBaseDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java index 6d31b402f3d69..6d8e012eccac6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseDetails; +import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class DataVersionBaseDataInner extends ProxyResource { +public final class DataVersionBaseInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private DataVersionBaseDetails properties; + private DataVersionBaseProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class DataVersionBaseDataInner extends ProxyResource { * * @return the properties value. */ - public DataVersionBaseDetails properties() { + public DataVersionBaseProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public DataVersionBaseDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the DataVersionBaseDataInner object itself. + * @return the DataVersionBaseInner object itself. */ - public DataVersionBaseDataInner withProperties(DataVersionBaseDetails properties) { + public DataVersionBaseInner withProperties(DataVersionBaseProperties properties) { this.properties = properties; return this; } @@ -65,12 +64,11 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model DataVersionBaseDataInner")); + new IllegalArgumentException("Missing required property properties in model DataVersionBaseInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseDataInner.class); + 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/DatastoreDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java similarity index 83% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java index befaa4c64e74c..f23efc46bda5b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.DatastoreDetails; +import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class DatastoreDataInner extends ProxyResource { +public final class DatastoreInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private DatastoreDetails properties; + private DatastoreProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class DatastoreDataInner extends ProxyResource { * * @return the properties value. */ - public DatastoreDetails properties() { + public DatastoreProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public DatastoreDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the DatastoreDataInner object itself. + * @return the DatastoreInner object itself. */ - public DatastoreDataInner withProperties(DatastoreDetails properties) { + public DatastoreInner withProperties(DatastoreProperties properties) { this.properties = properties; return this; } @@ -65,11 +64,11 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model DatastoreDataInner")); + new IllegalArgumentException("Missing required property properties in model DatastoreInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(DatastoreDataInner.class); + 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/EndpointPropertiesBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java index dd1ad8649f64c..c8847057e17dc 100644 --- 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 @@ -15,9 +15,8 @@ @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. + * [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; @@ -30,15 +29,13 @@ public class EndpointPropertiesBaseInner { /* * EndpointAuthKeys to set initially on an Endpoint. - * This property will always be returned as null. AuthKey values must be - * retrieved using the ListKeys API. + * 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. + * Property dictionary. Properties can be added, but not removed or altered. */ @JsonProperty(value = "properties") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java similarity index 81% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java index e0b57af590f22..5dc1b9a4a069a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerDetails; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class EnvironmentContainerDataInner extends ProxyResource { +public final class EnvironmentContainerInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private EnvironmentContainerDetails properties; + private EnvironmentContainerProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class EnvironmentContainerDataInner extends ProxyResource { * * @return the properties value. */ - public EnvironmentContainerDetails properties() { + public EnvironmentContainerProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public EnvironmentContainerDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the EnvironmentContainerDataInner object itself. + * @return the EnvironmentContainerInner object itself. */ - public EnvironmentContainerDataInner withProperties(EnvironmentContainerDetails properties) { + public EnvironmentContainerInner withProperties(EnvironmentContainerProperties properties) { this.properties = properties; return this; } @@ -66,11 +65,11 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model EnvironmentContainerDataInner")); + "Missing required property properties in model EnvironmentContainerInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentContainerDataInner.class); + 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/EnvironmentVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java similarity index 82% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java index 70dba5130698c..906fa9b747416 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionDetails; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class EnvironmentVersionDataInner extends ProxyResource { +public final class EnvironmentVersionInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private EnvironmentVersionDetails properties; + private EnvironmentVersionProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class EnvironmentVersionDataInner extends ProxyResource { * * @return the properties value. */ - public EnvironmentVersionDetails properties() { + public EnvironmentVersionProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public EnvironmentVersionDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the EnvironmentVersionDataInner object itself. + * @return the EnvironmentVersionInner object itself. */ - public EnvironmentVersionDataInner withProperties(EnvironmentVersionDetails properties) { + public EnvironmentVersionInner withProperties(EnvironmentVersionProperties properties) { this.properties = properties; return this; } @@ -66,11 +65,11 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model EnvironmentVersionDataInner")); + "Missing required property properties in model EnvironmentVersionInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVersionDataInner.class); + 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/ExportSummaryInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExportSummaryInner.java new file mode 100644 index 0000000000000..4099b19c102b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExportSummaryInner.java @@ -0,0 +1,98 @@ +// Copyright (c) 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.CocoExportSummary; +import com.azure.resourcemanager.machinelearning.models.CsvExportSummary; +import com.azure.resourcemanager.machinelearning.models.DatasetExportSummary; +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; + +/** The ExportSummary model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "format", + defaultImpl = ExportSummaryInner.class) +@JsonTypeName("ExportSummary") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Coco", value = CocoExportSummary.class), + @JsonSubTypes.Type(name = "CSV", value = CsvExportSummary.class), + @JsonSubTypes.Type(name = "Dataset", value = DatasetExportSummary.class) +}) +@Immutable +public class ExportSummaryInner { + /* + * The time when the export was completed. + */ + @JsonProperty(value = "endDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endDateTime; + + /* + * The total number of labeled datapoints exported. + */ + @JsonProperty(value = "exportedRowCount", access = JsonProperty.Access.WRITE_ONLY) + private Long exportedRowCount; + + /* + * Name and identifier of the job containing exported labels. + */ + @JsonProperty(value = "labelingJobId", access = JsonProperty.Access.WRITE_ONLY) + private String labelingJobId; + + /* + * The time when the export was requested. + */ + @JsonProperty(value = "startDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startDateTime; + + /** + * Get the endDateTime property: The time when the export was completed. + * + * @return the endDateTime value. + */ + public OffsetDateTime endDateTime() { + return this.endDateTime; + } + + /** + * Get the exportedRowCount property: The total number of labeled datapoints exported. + * + * @return the exportedRowCount value. + */ + public Long exportedRowCount() { + return this.exportedRowCount; + } + + /** + * Get the labelingJobId property: Name and identifier of the job containing exported labels. + * + * @return the labelingJobId value. + */ + public String labelingJobId() { + return this.labelingJobId; + } + + /** + * Get the startDateTime property: The time when the export was requested. + * + * @return the startDateTime value. + */ + public OffsetDateTime startDateTime() { + return this.startDateTime; + } + + /** + * 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/JobBaseDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java similarity index 81% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java index 45a01d708025b..374a73c47998e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.JobBaseDetails; +import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class JobBaseDataInner extends ProxyResource { +public final class JobBaseInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private JobBaseDetails properties; + private JobBaseProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class JobBaseDataInner extends ProxyResource { * * @return the properties value. */ - public JobBaseDetails properties() { + public JobBaseProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public JobBaseDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the JobBaseDataInner object itself. + * @return the JobBaseInner object itself. */ - public JobBaseDataInner withProperties(JobBaseDetails properties) { + public JobBaseInner withProperties(JobBaseProperties properties) { this.properties = properties; return this; } @@ -65,11 +64,11 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model JobBaseDataInner")); + new IllegalArgumentException("Missing required property properties in model JobBaseInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(JobBaseDataInner.class); + 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/LabelingJobInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobInner.java new file mode 100644 index 0000000000000..dbe382c4767c9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobInner.java @@ -0,0 +1,74 @@ +// Copyright (c) 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.LabelingJobProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class LabelingJobInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private LabelingJobProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public LabelingJobProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the LabelingJobInner object itself. + */ + public LabelingJobInner withProperties(LabelingJobProperties 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 LabelingJobInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LabelingJobInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java index cf087cc22b9a6..e5eeb4594fc51 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.ModelContainerDetails; +import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class ModelContainerDataInner extends ProxyResource { +public final class ModelContainerInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private ModelContainerDetails properties; + private ModelContainerProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class ModelContainerDataInner extends ProxyResource { * * @return the properties value. */ - public ModelContainerDetails properties() { + public ModelContainerProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public ModelContainerDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the ModelContainerDataInner object itself. + * @return the ModelContainerInner object itself. */ - public ModelContainerDataInner withProperties(ModelContainerDetails properties) { + public ModelContainerInner withProperties(ModelContainerProperties properties) { this.properties = properties; return this; } @@ -65,12 +64,11 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model ModelContainerDataInner")); + new IllegalArgumentException("Missing required property properties in model ModelContainerInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ModelContainerDataInner.class); + 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/ModelVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java similarity index 79% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java index 270dd14edc81c..8f4fd7929bd15 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java @@ -8,21 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.ModelVersionDetails; +import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class ModelVersionDataInner extends ProxyResource { +public final class ModelVersionInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private ModelVersionDetails properties; + private ModelVersionProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -32,7 +31,7 @@ public final class ModelVersionDataInner extends ProxyResource { * * @return the properties value. */ - public ModelVersionDetails properties() { + public ModelVersionProperties properties() { return this.properties; } @@ -40,9 +39,9 @@ public ModelVersionDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the ModelVersionDataInner object itself. + * @return the ModelVersionInner object itself. */ - public ModelVersionDataInner withProperties(ModelVersionDetails properties) { + public ModelVersionInner withProperties(ModelVersionProperties properties) { this.properties = properties; return this; } @@ -65,12 +64,11 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model ModelVersionDataInner")); + new IllegalArgumentException("Missing required property properties in model ModelVersionInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ModelVersionDataInner.class); + 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/OnlineDeploymentDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java similarity index 80% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java index 3f1dae7cf453c..59ee701f05761 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java @@ -9,24 +9,22 @@ import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentDetails; +import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties; import com.azure.resourcemanager.machinelearning.models.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The OnlineDeploymentData model. */ +/** The OnlineDeployment model. */ @Fluent -public final class OnlineDeploymentDataInner extends Resource { +public final class OnlineDeploymentInner extends Resource { /* - * Managed service identity (system assigned and/or user assigned - * identities) + * 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. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. */ @JsonProperty(value = "kind") private String kind; @@ -35,7 +33,7 @@ public final class OnlineDeploymentDataInner extends Resource { * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private OnlineDeploymentDetails properties; + private OnlineDeploymentProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -44,8 +42,7 @@ public final class OnlineDeploymentDataInner extends Resource { private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -63,9 +60,9 @@ public ManagedServiceIdentity identity() { * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * * @param identity the identity value to set. - * @return the OnlineDeploymentDataInner object itself. + * @return the OnlineDeploymentInner object itself. */ - public OnlineDeploymentDataInner withIdentity(ManagedServiceIdentity identity) { + public OnlineDeploymentInner withIdentity(ManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -85,9 +82,9 @@ public String kind() { * the same type. * * @param kind the kind value to set. - * @return the OnlineDeploymentDataInner object itself. + * @return the OnlineDeploymentInner object itself. */ - public OnlineDeploymentDataInner withKind(String kind) { + public OnlineDeploymentInner withKind(String kind) { this.kind = kind; return this; } @@ -97,7 +94,7 @@ public OnlineDeploymentDataInner withKind(String kind) { * * @return the properties value. */ - public OnlineDeploymentDetails properties() { + public OnlineDeploymentProperties properties() { return this.properties; } @@ -105,9 +102,9 @@ public OnlineDeploymentDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the OnlineDeploymentDataInner object itself. + * @return the OnlineDeploymentInner object itself. */ - public OnlineDeploymentDataInner withProperties(OnlineDeploymentDetails properties) { + public OnlineDeploymentInner withProperties(OnlineDeploymentProperties properties) { this.properties = properties; return this; } @@ -125,9 +122,9 @@ public Sku sku() { * Set the sku property: Sku details required for ARM contract for Autoscaling. * * @param sku the sku value to set. - * @return the OnlineDeploymentDataInner object itself. + * @return the OnlineDeploymentInner object itself. */ - public OnlineDeploymentDataInner withSku(Sku sku) { + public OnlineDeploymentInner withSku(Sku sku) { this.sku = sku; return this; } @@ -143,14 +140,14 @@ public SystemData systemData() { /** {@inheritDoc} */ @Override - public OnlineDeploymentDataInner withLocation(String location) { + public OnlineDeploymentInner withLocation(String location) { super.withLocation(location); return this; } /** {@inheritDoc} */ @Override - public OnlineDeploymentDataInner withTags(Map tags) { + public OnlineDeploymentInner withTags(Map tags) { super.withTags(tags); return this; } @@ -168,7 +165,7 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model OnlineDeploymentDataInner")); + "Missing required property properties in model OnlineDeploymentInner")); } else { properties().validate(); } @@ -177,5 +174,5 @@ public void validate() { } } - private static final ClientLogger LOGGER = new ClientLogger(OnlineDeploymentDataInner.class); + 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/OnlineEndpointDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointDataInner.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java index 9fad748e05c30..e28af7259a204 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointDataInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java @@ -9,24 +9,22 @@ import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointDetails; +import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; import com.azure.resourcemanager.machinelearning.models.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The OnlineEndpointData model. */ +/** The OnlineEndpoint model. */ @Fluent -public final class OnlineEndpointDataInner extends Resource { +public final class OnlineEndpointInner extends Resource { /* - * Managed service identity (system assigned and/or user assigned - * identities) + * 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. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. */ @JsonProperty(value = "kind") private String kind; @@ -35,7 +33,7 @@ public final class OnlineEndpointDataInner extends Resource { * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private OnlineEndpointDetails properties; + private OnlineEndpointProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -44,8 +42,7 @@ public final class OnlineEndpointDataInner extends Resource { private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -63,9 +60,9 @@ public ManagedServiceIdentity identity() { * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * * @param identity the identity value to set. - * @return the OnlineEndpointDataInner object itself. + * @return the OnlineEndpointInner object itself. */ - public OnlineEndpointDataInner withIdentity(ManagedServiceIdentity identity) { + public OnlineEndpointInner withIdentity(ManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -85,9 +82,9 @@ public String kind() { * the same type. * * @param kind the kind value to set. - * @return the OnlineEndpointDataInner object itself. + * @return the OnlineEndpointInner object itself. */ - public OnlineEndpointDataInner withKind(String kind) { + public OnlineEndpointInner withKind(String kind) { this.kind = kind; return this; } @@ -97,7 +94,7 @@ public OnlineEndpointDataInner withKind(String kind) { * * @return the properties value. */ - public OnlineEndpointDetails properties() { + public OnlineEndpointProperties properties() { return this.properties; } @@ -105,9 +102,9 @@ public OnlineEndpointDetails properties() { * Set the properties property: [Required] Additional attributes of the entity. * * @param properties the properties value to set. - * @return the OnlineEndpointDataInner object itself. + * @return the OnlineEndpointInner object itself. */ - public OnlineEndpointDataInner withProperties(OnlineEndpointDetails properties) { + public OnlineEndpointInner withProperties(OnlineEndpointProperties properties) { this.properties = properties; return this; } @@ -125,9 +122,9 @@ public Sku sku() { * Set the sku property: Sku details required for ARM contract for Autoscaling. * * @param sku the sku value to set. - * @return the OnlineEndpointDataInner object itself. + * @return the OnlineEndpointInner object itself. */ - public OnlineEndpointDataInner withSku(Sku sku) { + public OnlineEndpointInner withSku(Sku sku) { this.sku = sku; return this; } @@ -143,14 +140,14 @@ public SystemData systemData() { /** {@inheritDoc} */ @Override - public OnlineEndpointDataInner withLocation(String location) { + public OnlineEndpointInner withLocation(String location) { super.withLocation(location); return this; } /** {@inheritDoc} */ @Override - public OnlineEndpointDataInner withTags(Map tags) { + public OnlineEndpointInner withTags(Map tags) { super.withTags(tags); return this; } @@ -167,8 +164,7 @@ public void validate() { if (properties() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model OnlineEndpointDataInner")); + new IllegalArgumentException("Missing required property properties in model OnlineEndpointInner")); } else { properties().validate(); } @@ -177,5 +173,5 @@ public void validate() { } } - private static final ClientLogger LOGGER = new ClientLogger(OnlineEndpointDataInner.class); + 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 index 62a31cb1a7b9f..dc583434554eb 100644 --- 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 @@ -51,8 +51,7 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 index 50e448958b640..910bb5a3c92e1 100644 --- 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 @@ -21,8 +21,7 @@ public final class PrivateEndpointConnectionProperties { private PrivateEndpoint privateEndpoint; /* - * A collection of information about the state of the connection between - * service consumer and provider. + * A collection of information about the state of the connection between service consumer and provider. */ @JsonProperty(value = "privateLinkServiceConnectionState", required = true) private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; 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 index 055ba0985b784..f405a70f7ed7e 100644 --- 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 @@ -37,7 +37,9 @@ public final class ResourceQuotaInner { private ResourceName name; /* - * Limit. The maximum permitted quota of the resource. + * Limit. + * + * The maximum permitted quota of the resource. */ @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Long limit; @@ -85,7 +87,9 @@ public ResourceName name() { } /** - * Get the limit property: Limit. The maximum permitted quota of the resource. + * Get the limit property: Limit. + * + *

The maximum permitted quota of the resource. * * @return the limit value. */ 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 new file mode 100644 index 0000000000000..6040f6705d834 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java @@ -0,0 +1,74 @@ +// Copyright (c) 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; + + /** + * 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 index 138ce37374893..be5f199dd9720 100644 --- 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 @@ -30,8 +30,7 @@ public final class SharedPrivateLinkResourceProperty { private String requestMessage; /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ @JsonProperty(value = "status") private PrivateEndpointServiceConnectionStatus status; 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 index a236638281281..2cf11bde7d7b5 100644 --- 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 @@ -19,9 +19,8 @@ public final class UpdateWorkspaceQuotasResultInner { 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. + * 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; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionInner.java deleted file mode 100644 index 29a2eba2110c6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionInner.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace connection. */ -@Fluent -public final class WorkspaceConnectionInner extends ProxyResource { - /* - * Properties of workspace connection. - */ - @JsonProperty(value = "properties") - private WorkspaceConnectionProps innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: Properties of workspace connection. - * - * @return the innerProperties value. - */ - private WorkspaceConnectionProps innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the category property: Category of the workspace connection. - * - * @return the category value. - */ - public String category() { - return this.innerProperties() == null ? null : this.innerProperties().category(); - } - - /** - * Set the category property: Category of the workspace connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withCategory(String category) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withCategory(category); - return this; - } - - /** - * Get the target property: Target of the workspace connection. - * - * @return the target value. - */ - public String target() { - return this.innerProperties() == null ? null : this.innerProperties().target(); - } - - /** - * Set the target property: Target of the workspace connection. - * - * @param target the target value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withTarget(String target) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withTarget(target); - return this; - } - - /** - * Get the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - public String authType() { - return this.innerProperties() == null ? null : this.innerProperties().authType(); - } - - /** - * Set the authType property: Authorization type of the workspace connection. - * - * @param authType the authType value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withAuthType(String authType) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withAuthType(authType); - return this; - } - - /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. - */ - public String value() { - return this.innerProperties() == null ? null : this.innerProperties().value(); - } - - /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withValue(String value) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withValue(value); - return this; - } - - /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - public ValueFormat valueFormat() { - return this.innerProperties() == null ? null : this.innerProperties().valueFormat(); - } - - /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withValueFormat(ValueFormat valueFormat) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java new file mode 100644 index 0000000000000..c095b2dacda5f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java @@ -0,0 +1,78 @@ +// Copyright (c) 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; + + /** + * 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 index dccf0f29f1b64..68e8d8fdb655f 100644 --- 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 @@ -9,11 +9,11 @@ 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.azure.resourcemanager.machinelearning.models.WorkspaceProvisioningState; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -54,8 +54,7 @@ public final class WorkspaceInner extends ProxyResource { private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -340,7 +339,7 @@ public WorkspaceInner withDiscoveryUrl(String discoveryUrl) { * * @return the provisioningState value. */ - public ProvisioningState provisioningState() { + public WorkspaceProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } @@ -601,6 +600,49 @@ public String mlFlowTrackingUri() { return this.innerProperties() == null ? null : this.innerProperties().mlFlowTrackingUri(); } + /** + * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + public Boolean v1LegacyMode() { + return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); + } + + /** + * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @param v1LegacyMode the v1LegacyMode value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withV1LegacyMode(Boolean v1LegacyMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withV1LegacyMode(v1LegacyMode); + return this; + } + + /** + * Get the softDeletedAt property: The timestamp when the workspace was soft deleted. + * + * @return the softDeletedAt value. + */ + public String softDeletedAt() { + return this.innerProperties() == null ? null : this.innerProperties().softDeletedAt(); + } + + /** + * Get the scheduledPurgeDate property: The timestamp when the soft deleted workspace is going to be purged. + * + * @return the scheduledPurgeDate value. + */ + public String scheduledPurgeDate() { + return this.innerProperties() == null ? null : this.innerProperties().scheduledPurgeDate(); + } + /** * Validates the instance. * 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 index afc399e84a5b4..f353aa8e4355f 100644 --- 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 @@ -6,10 +6,10 @@ 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.azure.resourcemanager.machinelearning.models.WorkspaceProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -35,8 +35,8 @@ public final class WorkspacePropertiesInner { private String friendlyName; /* - * ARM id of the key vault associated with this workspace. This cannot be - * changed once the workspace has been created + * 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; @@ -54,25 +54,24 @@ public final class WorkspacePropertiesInner { private String containerRegistry; /* - * ARM id of the storage account associated with this workspace. This - * cannot be changed once the workspace has been created + * 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 + * 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. + * 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; + private WorkspaceProvisioningState provisioningState; /* * The encryption settings of Azure ML workspace. @@ -81,15 +80,14 @@ public final class WorkspacePropertiesInner { private EncryptionProperty encryption; /* - * The flag to signal HBI data in the workspace and reduce diagnostic data - * collected by the service + * 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 + * 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; @@ -143,8 +141,7 @@ public final class WorkspacePropertiesInner { private ServiceManagedResourcesSettings serviceManagedResourcesSettings; /* - * The user assigned identity resource id that represents the workspace - * identity. + * The user assigned identity resource id that represents the workspace identity. */ @JsonProperty(value = "primaryUserAssignedIdentity") private String primaryUserAssignedIdentity; @@ -156,19 +153,35 @@ public final class WorkspacePropertiesInner { private String tenantId; /* - * If the storage associated with the workspace has hierarchical - * namespace(HNS) enabled. + * 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. + * 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; + + /* + * The timestamp when the workspace was soft deleted + */ + @JsonProperty(value = "softDeletedAt", access = JsonProperty.Access.WRITE_ONLY) + private String softDeletedAt; + + /* + * The timestamp when the soft deleted workspace is going to be purged + */ + @JsonProperty(value = "scheduledPurgeDate", access = JsonProperty.Access.WRITE_ONLY) + private String scheduledPurgeDate; + /** * Get the workspaceId property: The immutable id associated with this workspace. * @@ -330,7 +343,7 @@ public WorkspacePropertiesInner withDiscoveryUrl(String discoveryUrl) { * * @return the provisioningState value. */ - public ProvisioningState provisioningState() { + public WorkspaceProvisioningState provisioningState() { return this.provisioningState; } @@ -568,6 +581,46 @@ public String mlFlowTrackingUri() { return this.mlFlowTrackingUri; } + /** + * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + public Boolean v1LegacyMode() { + return this.v1LegacyMode; + } + + /** + * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @param v1LegacyMode the v1LegacyMode value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { + this.v1LegacyMode = v1LegacyMode; + return this; + } + + /** + * Get the softDeletedAt property: The timestamp when the workspace was soft deleted. + * + * @return the softDeletedAt value. + */ + public String softDeletedAt() { + return this.softDeletedAt; + } + + /** + * Get the scheduledPurgeDate property: The timestamp when the soft deleted workspace is going to be purged. + * + * @return the scheduledPurgeDate value. + */ + public String scheduledPurgeDate() { + return this.scheduledPurgeDate; + } + /** * Validates the instance. * 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 index 21988b519d02d..12a8d143e7b52 100644 --- 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.fasterxml.jackson.annotation.JsonProperty; @@ -37,8 +38,7 @@ public final class WorkspacePropertiesUpdateParameters { private ServiceManagedResourcesSettings serviceManagedResourcesSettings; /* - * The user assigned identity resource id that represents the workspace - * identity. + * The user assigned identity resource id that represents the workspace identity. */ @JsonProperty(value = "primaryUserAssignedIdentity") private String primaryUserAssignedIdentity; @@ -61,6 +61,12 @@ public final class WorkspacePropertiesUpdateParameters { @JsonProperty(value = "containerRegistry") private String containerRegistry; + /* + * The encryption settings of the workspace. + */ + @JsonProperty(value = "encryption") + private EncryptionUpdateProperties encryption; + /** * Get the description property: The description of this workspace. * @@ -224,6 +230,26 @@ public WorkspacePropertiesUpdateParameters withContainerRegistry(String containe return this; } + /** + * Get the encryption property: The encryption settings of the workspace. + * + * @return the encryption value. + */ + public EncryptionUpdateProperties encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The encryption settings of the workspace. + * + * @param encryption the encryption value to set. + * @return the WorkspacePropertiesUpdateParameters object itself. + */ + public WorkspacePropertiesUpdateParameters withEncryption(EncryptionUpdateProperties encryption) { + this.encryption = encryption; + return this; + } + /** * Validates the instance. * @@ -233,5 +259,8 @@ public void validate() { if (serviceManagedResourcesSettings() != null) { serviceManagedResourcesSettings().validate(); } + if (encryption() != null) { + encryption().validate(); + } } } 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 index f0af624f53aeb..018c1d288b6ac 100644 --- 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 @@ -119,24 +119,26 @@ public AzureMachineLearningWorkspacesBuilder serializerAdapter(SerializerAdapter * @return an instance of AzureMachineLearningWorkspacesImpl. */ public AzureMachineLearningWorkspacesImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + 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( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + 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 index e40efd2bb575e..52341b588dee6 100644 --- 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 @@ -36,6 +36,7 @@ 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.LabelingJobsClient; import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; import com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; @@ -44,6 +45,7 @@ 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; @@ -385,6 +387,18 @@ public JobsClient getJobs() { return this.jobs; } + /** The LabelingJobsClient object to access its operations. */ + private final LabelingJobsClient labelingJobs; + + /** + * Gets the LabelingJobsClient object to access its operations. + * + * @return the LabelingJobsClient object. + */ + public LabelingJobsClient getLabelingJobs() { + return this.labelingJobs; + } + /** The ModelContainersClient object to access its operations. */ private final ModelContainersClient modelContainers; @@ -433,6 +447,18 @@ 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; @@ -467,7 +493,7 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-02-01-preview"; + this.apiVersion = "2022-06-01-preview"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); this.usages = new UsagesClientImpl(this); @@ -489,10 +515,12 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.environmentContainers = new EnvironmentContainersClientImpl(this); this.environmentVersions = new EnvironmentVersionsClientImpl(this); this.jobs = new JobsClientImpl(this); + this.labelingJobs = new LabelingJobsClientImpl(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); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java similarity index 71% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java index fe5494f08928d..379a98ca04ceb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java @@ -7,21 +7,18 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentData; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentDetails; +import com.azure.resourcemanager.machinelearning.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.PartialBatchDeploymentPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; +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 BatchDeploymentDataImpl - implements BatchDeploymentData, BatchDeploymentData.Definition, BatchDeploymentData.Update { - private BatchDeploymentDataInner innerObject; +public final class BatchDeploymentImpl implements BatchDeployment, BatchDeployment.Definition, BatchDeployment.Update { + private BatchDeploymentInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -58,7 +55,7 @@ public String kind() { return this.innerModel().kind(); } - public BatchDeploymentDetails properties() { + public BatchDeploymentProperties properties() { return this.innerModel().properties(); } @@ -82,7 +79,7 @@ public String resourceGroupName() { return resourceGroupName; } - public BatchDeploymentDataInner innerModel() { + public BatchDeploymentInner innerModel() { return this.innerObject; } @@ -98,9 +95,9 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String deploymentName; - private PartialBatchDeploymentPartialTrackedResource updateBody; + private PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties updateBody; - public BatchDeploymentDataImpl withExistingBatchEndpoint( + public BatchDeploymentImpl withExistingBatchEndpoint( String resourceGroupName, String workspaceName, String endpointName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; @@ -108,7 +105,7 @@ public BatchDeploymentDataImpl withExistingBatchEndpoint( return this; } - public BatchDeploymentData create() { + public BatchDeployment create() { this.innerObject = serviceManager .serviceClient() @@ -118,7 +115,7 @@ public BatchDeploymentData create() { return this; } - public BatchDeploymentData create(Context context) { + public BatchDeployment create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -128,19 +125,18 @@ public BatchDeploymentData create(Context context) { return this; } - BatchDeploymentDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new BatchDeploymentDataInner(); + BatchDeploymentImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new BatchDeploymentInner(); this.serviceManager = serviceManager; this.deploymentName = name; } - public BatchDeploymentDataImpl update() { - this.updateBody = new PartialBatchDeploymentPartialTrackedResource(); + public BatchDeploymentImpl update() { + this.updateBody = new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties(); return this; } - public BatchDeploymentData apply() { + public BatchDeployment apply() { this.innerObject = serviceManager .serviceClient() @@ -149,7 +145,7 @@ public BatchDeploymentData apply() { return this; } - public BatchDeploymentData apply(Context context) { + public BatchDeployment apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -158,8 +154,8 @@ public BatchDeploymentData apply(Context context) { return this; } - BatchDeploymentDataImpl( - BatchDeploymentDataInner innerObject, + BatchDeploymentImpl( + BatchDeploymentInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -169,7 +165,7 @@ public BatchDeploymentData apply(Context context) { this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "deployments"); } - public BatchDeploymentData refresh() { + public BatchDeployment refresh() { this.innerObject = serviceManager .serviceClient() @@ -179,7 +175,7 @@ public BatchDeploymentData refresh() { return this; } - public BatchDeploymentData refresh(Context context) { + public BatchDeployment refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -189,22 +185,22 @@ public BatchDeploymentData refresh(Context context) { return this; } - public BatchDeploymentDataImpl withRegion(Region location) { + public BatchDeploymentImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; } - public BatchDeploymentDataImpl withRegion(String location) { + public BatchDeploymentImpl withRegion(String location) { this.innerModel().withLocation(location); return this; } - public BatchDeploymentDataImpl withProperties(BatchDeploymentDetails properties) { + public BatchDeploymentImpl withProperties(BatchDeploymentProperties properties) { this.innerModel().withProperties(properties); return this; } - public BatchDeploymentDataImpl withTags(Map tags) { + public BatchDeploymentImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); return this; @@ -214,41 +210,26 @@ public BatchDeploymentDataImpl withTags(Map tags) { } } - public BatchDeploymentDataImpl withIdentity(ManagedServiceIdentity identity) { + public BatchDeploymentImpl withIdentity(ManagedServiceIdentity identity) { this.innerModel().withIdentity(identity); return this; } - public BatchDeploymentDataImpl withKind(String kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateBody.withKind(kind); - return this; - } - } - - public BatchDeploymentDataImpl withSku(Sku sku) { - this.innerModel().withSku(sku); + public BatchDeploymentImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } - public BatchDeploymentDataImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); + public BatchDeploymentImpl withSku(Sku sku) { + this.innerModel().withSku(sku); return this; } - public BatchDeploymentDataImpl withProperties(PartialBatchDeployment properties) { + public BatchDeploymentImpl withProperties(PartialBatchDeployment properties) { this.updateBody.withProperties(properties); return this; } - public BatchDeploymentDataImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); - return this; - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java index 6986819a12fef..ebcc86624e734 100644 --- 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 @@ -33,9 +33,9 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; import com.azure.resourcemanager.machinelearning.models.BatchDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -111,7 +111,7 @@ Mono>> delete( + "/deployments/{deploymentName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -137,7 +137,7 @@ Mono>> update( @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialBatchDeploymentPartialTrackedResource body, + @BodyParam("application/json") PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, @HeaderParam("Accept") String accept, Context context); @@ -156,7 +156,7 @@ Mono>> createOrUpdate( @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BatchDeploymentDataInner body, + @BodyParam("application/json") BatchDeploymentInner body, @HeaderParam("Accept") String accept, Context context); @@ -187,7 +187,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { if (this.client.getEndpoint() == null) { return Mono @@ -228,7 +228,7 @@ private Mono> listSinglePageAsync( skip, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -257,7 +257,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String endpointName, @@ -328,7 +328,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + 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), @@ -347,7 +347,7 @@ private PagedFlux listAsync( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String endpointName) { final String orderBy = null; final Integer top = null; @@ -373,7 +373,7 @@ private PagedFlux listAsync( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String endpointName, @@ -398,7 +398,7 @@ private PagedFlux listAsync( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String endpointName) { final String orderBy = null; final Integer top = null; @@ -422,7 +422,7 @@ public PagedIterable list( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String endpointName, @@ -721,7 +721,7 @@ public void delete( * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { if (this.client.getEndpoint() == null) { return Mono @@ -780,7 +780,7 @@ private Mono> getWithResponseAsync( * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -835,7 +835,7 @@ private Mono> getWithResponseAsync( * @return a batch inference deployment by id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono getAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -854,7 +854,7 @@ private Mono getAsync( * @return a batch inference deployment by id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentDataInner get( + public BatchDeploymentInner get( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { return getAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); } @@ -873,7 +873,7 @@ public BatchDeploymentDataInner get( * @return a batch inference deployment by id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); } @@ -897,7 +897,7 @@ private Mono>> updateWithResponseAsync( String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body) { + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -967,7 +967,7 @@ private Mono>> updateWithResponseAsync( String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1029,21 +1029,21 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentDataInner> beginUpdateAsync( + private PollerFlux, BatchDeploymentInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body) { + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - BatchDeploymentDataInner.class, - BatchDeploymentDataInner.class, + BatchDeploymentInner.class, + BatchDeploymentInner.class, this.client.getContext()); } @@ -1062,24 +1062,20 @@ private PollerFlux, BatchDeploymentDataInne * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentDataInner> beginUpdateAsync( + private PollerFlux, BatchDeploymentInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body, + 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(), - BatchDeploymentDataInner.class, - BatchDeploymentDataInner.class, - context); + .getLroResult( + mono, this.client.getHttpPipeline(), BatchDeploymentInner.class, BatchDeploymentInner.class, context); } /** @@ -1096,12 +1092,12 @@ private PollerFlux, BatchDeploymentDataInne * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentDataInner> beginUpdate( + public SyncPoller, BatchDeploymentInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body) { + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).getSyncPoller(); } @@ -1120,12 +1116,12 @@ public SyncPoller, BatchDeploymentDataInner * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentDataInner> beginUpdate( + public SyncPoller, BatchDeploymentInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .getSyncPoller(); @@ -1145,12 +1141,12 @@ public SyncPoller, BatchDeploymentDataInner * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body) { + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1171,12 +1167,12 @@ private Mono updateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .last() @@ -1197,12 +1193,12 @@ private Mono updateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentDataInner update( + public BatchDeploymentInner update( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body) { + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); } @@ -1221,12 +1217,12 @@ public BatchDeploymentDataInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentDataInner update( + public BatchDeploymentInner update( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialTrackedResource body, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); } @@ -1250,7 +1246,7 @@ private Mono>> createOrUpdateWithResponseAsync( String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body) { + BatchDeploymentInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1320,7 +1316,7 @@ private Mono>> createOrUpdateWithResponseAsync( String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body, + BatchDeploymentInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1382,21 +1378,21 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentDataInner> beginCreateOrUpdateAsync( + private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body) { + BatchDeploymentInner body) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - BatchDeploymentDataInner.class, - BatchDeploymentDataInner.class, + BatchDeploymentInner.class, + BatchDeploymentInner.class, this.client.getContext()); } @@ -1415,12 +1411,12 @@ private PollerFlux, BatchDeploymentDataInne * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentDataInner> beginCreateOrUpdateAsync( + private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body, + BatchDeploymentInner body, Context context) { context = this.client.mergeContext(context); Mono>> mono = @@ -1428,12 +1424,8 @@ private PollerFlux, BatchDeploymentDataInne resourceGroupName, workspaceName, endpointName, deploymentName, body, context); return this .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchDeploymentDataInner.class, - BatchDeploymentDataInner.class, - context); + .getLroResult( + mono, this.client.getHttpPipeline(), BatchDeploymentInner.class, BatchDeploymentInner.class, context); } /** @@ -1450,12 +1442,12 @@ private PollerFlux, BatchDeploymentDataInne * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentDataInner> beginCreateOrUpdate( + public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body) { + BatchDeploymentInner body) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .getSyncPoller(); } @@ -1475,12 +1467,12 @@ public SyncPoller, BatchDeploymentDataInner * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentDataInner> beginCreateOrUpdate( + public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body, + BatchDeploymentInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .getSyncPoller(); @@ -1500,12 +1492,12 @@ public SyncPoller, BatchDeploymentDataInner * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body) { + BatchDeploymentInner body) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1526,12 +1518,12 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body, + BatchDeploymentInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .last() @@ -1552,12 +1544,12 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentDataInner createOrUpdate( + public BatchDeploymentInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body) { + BatchDeploymentInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); } @@ -1576,12 +1568,12 @@ public BatchDeploymentDataInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentDataInner createOrUpdate( + public BatchDeploymentInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentDataInner body, + BatchDeploymentInner body, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .block(); @@ -1598,7 +1590,7 @@ public BatchDeploymentDataInner createOrUpdate( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1611,7 +1603,7 @@ private Mono> listNextSinglePageAsync(St final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1635,7 +1627,7 @@ private Mono> listNextSinglePageAsync(St * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index 0432be7ce8f1e..6042e71009950 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentData; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; +import com.azure.resourcemanager.machinelearning.models.BatchDeployment; import com.azure.resourcemanager.machinelearning.models.BatchDeployments; public final class BatchDeploymentsImpl implements BatchDeployments { @@ -28,14 +28,13 @@ public BatchDeploymentsImpl( this.serviceManager = serviceManager; } - public PagedIterable list( - String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner = + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return Utils.mapPage(inner, inner1 -> new BatchDeploymentDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String endpointName, @@ -43,9 +42,9 @@ public PagedIterable list( Integer top, String skip, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new BatchDeploymentDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { @@ -57,20 +56,20 @@ public void delete( this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); } - public BatchDeploymentData get( + public BatchDeployment get( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - BatchDeploymentDataInner inner = + BatchDeploymentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); if (inner != null) { - return new BatchDeploymentDataImpl(inner, this.manager()); + return new BatchDeploymentImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - Response inner = + Response inner = this .serviceClient() .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); @@ -79,13 +78,13 @@ public Response getWithResponse( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BatchDeploymentDataImpl(inner.getValue(), this.manager())); + new BatchDeploymentImpl(inner.getValue(), this.manager())); } else { return null; } } - public BatchDeploymentData getById(String id) { + public BatchDeployment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -121,7 +120,7 @@ public BatchDeploymentData getById(String id) { .getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -231,7 +230,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public BatchDeploymentDataImpl define(String name) { - return new BatchDeploymentDataImpl(name, this.manager()); + 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/BatchEndpointDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java similarity index 70% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java index 518a953f8c0de..2abf63af55e9f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java @@ -7,22 +7,19 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointData; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDetails; +import com.azure.resourcemanager.machinelearning.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.PartialBatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpointPartialTrackedResource; import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; import com.azure.resourcemanager.machinelearning.models.Sku; import java.util.Collections; import java.util.Map; -public final class BatchEndpointDataImpl - implements BatchEndpointData, BatchEndpointData.Definition, BatchEndpointData.Update { - private BatchEndpointDataInner innerObject; +public final class BatchEndpointImpl implements BatchEndpoint, BatchEndpoint.Definition, BatchEndpoint.Update { + private BatchEndpointInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -59,7 +56,7 @@ public String kind() { return this.innerModel().kind(); } - public BatchEndpointDetails properties() { + public BatchEndpointProperties properties() { return this.innerModel().properties(); } @@ -79,7 +76,7 @@ public String resourceGroupName() { return resourceGroupName; } - public BatchEndpointDataInner innerModel() { + public BatchEndpointInner innerModel() { return this.innerObject; } @@ -93,15 +90,15 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String endpointName; - private PartialBatchEndpointPartialTrackedResource updateBody; + private PartialMinimalTrackedResourceWithIdentity updateBody; - public BatchEndpointDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public BatchEndpointImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public BatchEndpointData create() { + public BatchEndpoint create() { this.innerObject = serviceManager .serviceClient() @@ -110,7 +107,7 @@ public BatchEndpointData create() { return this; } - public BatchEndpointData create(Context context) { + public BatchEndpoint create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -119,19 +116,18 @@ public BatchEndpointData create(Context context) { return this; } - BatchEndpointDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new BatchEndpointDataInner(); + BatchEndpointImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new BatchEndpointInner(); this.serviceManager = serviceManager; this.endpointName = name; } - public BatchEndpointDataImpl update() { - this.updateBody = new PartialBatchEndpointPartialTrackedResource(); + public BatchEndpointImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithIdentity(); return this; } - public BatchEndpointData apply() { + public BatchEndpoint apply() { this.innerObject = serviceManager .serviceClient() @@ -140,7 +136,7 @@ public BatchEndpointData apply() { return this; } - public BatchEndpointData apply(Context context) { + public BatchEndpoint apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -149,8 +145,8 @@ public BatchEndpointData apply(Context context) { return this; } - BatchEndpointDataImpl( - BatchEndpointDataInner innerObject, + BatchEndpointImpl( + BatchEndpointInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -159,7 +155,7 @@ public BatchEndpointData apply(Context context) { this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); } - public BatchEndpointData refresh() { + public BatchEndpoint refresh() { this.innerObject = serviceManager .serviceClient() @@ -169,7 +165,7 @@ public BatchEndpointData refresh() { return this; } - public BatchEndpointData refresh(Context context) { + public BatchEndpoint refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -189,22 +185,22 @@ public Response listKeysWithResponse(Context context) { .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); } - public BatchEndpointDataImpl withRegion(Region location) { + public BatchEndpointImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; } - public BatchEndpointDataImpl withRegion(String location) { + public BatchEndpointImpl withRegion(String location) { this.innerModel().withLocation(location); return this; } - public BatchEndpointDataImpl withProperties(BatchEndpointDetails properties) { + public BatchEndpointImpl withProperties(BatchEndpointProperties properties) { this.innerModel().withProperties(properties); return this; } - public BatchEndpointDataImpl withTags(Map tags) { + public BatchEndpointImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); return this; @@ -214,41 +210,26 @@ public BatchEndpointDataImpl withTags(Map tags) { } } - public BatchEndpointDataImpl withIdentity(ManagedServiceIdentity identity) { + public BatchEndpointImpl withIdentity(ManagedServiceIdentity identity) { this.innerModel().withIdentity(identity); return this; } - public BatchEndpointDataImpl withKind(String kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateBody.withKind(kind); - return this; - } + public BatchEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; } - public BatchEndpointDataImpl withSku(Sku sku) { + public BatchEndpointImpl withSku(Sku sku) { this.innerModel().withSku(sku); return this; } - public BatchEndpointDataImpl withIdentity(PartialManagedServiceIdentity identity) { + public BatchEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { this.updateBody.withIdentity(identity); return this; } - public BatchEndpointDataImpl withProperties(PartialBatchEndpoint properties) { - this.updateBody.withProperties(properties); - return this; - } - - public BatchEndpointDataImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); - return this; - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java index 31905c31d7ab7..b82c7f16d00f6 100644 --- 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 @@ -34,10 +34,10 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; import com.azure.resourcemanager.machinelearning.models.BatchEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpointPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -107,7 +107,7 @@ Mono>> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -130,7 +130,7 @@ Mono>> update( @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialBatchEndpointPartialTrackedResource body, + @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, @HeaderParam("Accept") String accept, Context context); @@ -147,7 +147,7 @@ Mono>> createOrUpdate( @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BatchEndpointDataInner body, + @BodyParam("application/json") BatchEndpointInner body, @HeaderParam("Accept") String accept, Context context); @@ -193,7 +193,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, Integer count, String skip) { if (this.client.getEndpoint() == null) { return Mono @@ -229,7 +229,7 @@ private Mono> listSinglePageAsync( skip, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -256,7 +256,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -314,7 +314,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, Integer count, String skip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), @@ -332,7 +332,7 @@ private PagedFlux listAsync( * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final Integer count = null; final String skip = null; return new PagedFlux<>( @@ -354,7 +354,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, context), @@ -372,7 +372,7 @@ private PagedFlux listAsync( * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final Integer count = null; final String skip = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip)); @@ -392,7 +392,7 @@ public PagedIterable list(String resourceGroupName, Stri * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip, context)); } @@ -661,7 +661,7 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName) { if (this.client.getEndpoint() == null) { return Mono @@ -715,7 +715,7 @@ private Mono> getWithResponseAsync( * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -765,7 +765,7 @@ private Mono> getWithResponseAsync( * @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) { + private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -782,7 +782,7 @@ private Mono getAsync(String resourceGroupName, String w * @return a batch inference endpoint by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName) { + public BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { return getAsync(resourceGroupName, workspaceName, endpointName).block(); } @@ -799,7 +799,7 @@ public BatchEndpointDataInner get(String resourceGroupName, String workspaceName * @return a batch inference endpoint by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } @@ -821,7 +821,7 @@ private Mono>> updateWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -885,7 +885,7 @@ private Mono>> updateWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -942,20 +942,20 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointDataInner> beginUpdateAsync( + private PollerFlux, BatchEndpointInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - BatchEndpointDataInner.class, - BatchEndpointDataInner.class, + BatchEndpointInner.class, + BatchEndpointInner.class, this.client.getContext()); } @@ -973,23 +973,19 @@ private PollerFlux, BatchEndpointDataInner> b * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointDataInner> beginUpdateAsync( + private PollerFlux, BatchEndpointInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body, + 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(), - BatchEndpointDataInner.class, - BatchEndpointDataInner.class, - context); + .getLroResult( + mono, this.client.getHttpPipeline(), BatchEndpointInner.class, BatchEndpointInner.class, context); } /** @@ -1005,11 +1001,11 @@ private PollerFlux, BatchEndpointDataInner> b * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointDataInner> beginUpdate( + public SyncPoller, BatchEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); } @@ -1027,11 +1023,11 @@ public SyncPoller, BatchEndpointDataInner> be * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointDataInner> beginUpdate( + public SyncPoller, BatchEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); } @@ -1049,11 +1045,11 @@ public SyncPoller, BatchEndpointDataInner> be * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1073,11 +1069,11 @@ private Mono updateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) .last() @@ -1097,11 +1093,11 @@ private Mono updateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointDataInner update( + public BatchEndpointInner update( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); } @@ -1119,11 +1115,11 @@ public BatchEndpointDataInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointDataInner update( + public BatchEndpointInner update( String resourceGroupName, String workspaceName, String endpointName, - PartialBatchEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context) { return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } @@ -1142,7 +1138,7 @@ public BatchEndpointDataInner update( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body) { + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1203,11 +1199,7 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context) { + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1263,17 +1255,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body) { + private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - BatchEndpointDataInner.class, - BatchEndpointDataInner.class, + BatchEndpointInner.class, + BatchEndpointInner.class, this.client.getContext()); } @@ -1291,23 +1283,15 @@ private PollerFlux, BatchEndpointDataInner> b * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context) { + 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(), - BatchEndpointDataInner.class, - BatchEndpointDataInner.class, - context); + .getLroResult( + mono, this.client.getHttpPipeline(), BatchEndpointInner.class, BatchEndpointInner.class, context); } /** @@ -1323,8 +1307,8 @@ private PollerFlux, BatchEndpointDataInner> b * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body) { + public SyncPoller, BatchEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); } @@ -1342,12 +1326,8 @@ public SyncPoller, BatchEndpointDataInner> be * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context) { + public SyncPoller, BatchEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); } @@ -1364,8 +1344,8 @@ public SyncPoller, BatchEndpointDataInner> be * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1385,12 +1365,8 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context) { + 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); @@ -1409,8 +1385,8 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body) { + public BatchEndpointInner createOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); } @@ -1428,12 +1404,8 @@ public BatchEndpointDataInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context) { + public BatchEndpointInner createOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } @@ -1604,7 +1576,7 @@ public Response listKeysWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1617,7 +1589,7 @@ private Mono> listNextSinglePageAsync(Stri final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1641,7 +1613,7 @@ private Mono> listNextSinglePageAsync(Stri * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index fb052ad121b60..5b0179dccd10f 100644 --- 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 @@ -10,9 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointData; +import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; import com.azure.resourcemanager.machinelearning.models.BatchEndpoints; import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; @@ -30,16 +30,16 @@ public BatchEndpointsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new BatchEndpointDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, count, skip, context); - return Utils.mapPage(inner, inner1 -> new BatchEndpointDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String endpointName) { @@ -50,25 +50,25 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); } - public BatchEndpointData get(String resourceGroupName, String workspaceName, String endpointName) { - BatchEndpointDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); + public BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { + BatchEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); if (inner != null) { - return new BatchEndpointDataImpl(inner, this.manager()); + return new BatchEndpointImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BatchEndpointDataImpl(inner.getValue(), this.manager())); + new BatchEndpointImpl(inner.getValue(), this.manager())); } else { return null; } @@ -98,7 +98,7 @@ public Response listKeysWithResponse( } } - public BatchEndpointData getById(String id) { + public BatchEndpoint getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -125,7 +125,7 @@ public BatchEndpointData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -214,7 +214,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public BatchEndpointDataImpl define(String name) { - return new BatchEndpointDataImpl(name, this.manager()); + 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/CodeContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java index 0264bd5924f4d..f739c63622acd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java @@ -6,13 +6,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerData; -import com.azure.resourcemanager.machinelearning.models.CodeContainerDetails; +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 CodeContainerDataImpl - implements CodeContainerData, CodeContainerData.Definition, CodeContainerData.Update { - private CodeContainerDataInner innerObject; +public final class CodeContainerImpl implements CodeContainer, CodeContainer.Definition, CodeContainer.Update { + private CodeContainerInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +27,7 @@ public String type() { return this.innerModel().type(); } - public CodeContainerDetails properties() { + public CodeContainerProperties properties() { return this.innerModel().properties(); } @@ -40,7 +39,7 @@ public String resourceGroupName() { return resourceGroupName; } - public CodeContainerDataInner innerModel() { + public CodeContainerInner innerModel() { return this.innerObject; } @@ -54,13 +53,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String name; - public CodeContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public CodeContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public CodeContainerData create() { + public CodeContainer create() { this.innerObject = serviceManager .serviceClient() @@ -70,7 +69,7 @@ public CodeContainerData create() { return this; } - public CodeContainerData create(Context context) { + public CodeContainer create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -80,18 +79,17 @@ public CodeContainerData create(Context context) { return this; } - CodeContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeContainerDataInner(); + CodeContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new CodeContainerInner(); this.serviceManager = serviceManager; this.name = name; } - public CodeContainerDataImpl update() { + public CodeContainerImpl update() { return this; } - public CodeContainerData apply() { + public CodeContainer apply() { this.innerObject = serviceManager .serviceClient() @@ -101,7 +99,7 @@ public CodeContainerData apply() { return this; } - public CodeContainerData apply(Context context) { + public CodeContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -111,8 +109,8 @@ public CodeContainerData apply(Context context) { return this; } - CodeContainerDataImpl( - CodeContainerDataInner innerObject, + CodeContainerImpl( + CodeContainerInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -121,7 +119,7 @@ public CodeContainerData apply(Context context) { this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); } - public CodeContainerData refresh() { + public CodeContainer refresh() { this.innerObject = serviceManager .serviceClient() @@ -131,7 +129,7 @@ public CodeContainerData refresh() { return this; } - public CodeContainerData refresh(Context context) { + public CodeContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -141,7 +139,7 @@ public CodeContainerData refresh(Context context) { return this; } - public CodeContainerDataImpl withProperties(CodeContainerDetails properties) { + 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 index f52e7e3e1240a..5dd06e10ac13b 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; import reactor.core.publisher.Mono; @@ -97,7 +97,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -113,14 +113,14 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CodeContainerDataInner body, + @BodyParam("application/json") CodeContainerInner body, @HeaderParam("Accept") String accept, Context context); @@ -148,7 +148,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip) { if (this.client.getEndpoint() == null) { return Mono @@ -183,7 +183,7 @@ private Mono> listSinglePageAsync( skip, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -209,7 +209,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -265,7 +265,7 @@ private Mono> listSinglePageAsync( * @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) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -282,7 +282,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), @@ -302,7 +302,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), @@ -320,7 +320,7 @@ private PagedFlux listAsync( * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); } @@ -338,7 +338,7 @@ public PagedIterable list(String resourceGroupName, Stri * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); } @@ -507,7 +507,7 @@ public Response deleteWithResponse( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name) { if (this.client.getEndpoint() == null) { return Mono @@ -561,7 +561,7 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -611,7 +611,7 @@ private Mono> getWithResponseAsync( * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { return getWithResponseAsync(resourceGroupName, workspaceName, name) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -628,7 +628,7 @@ private Mono getAsync(String resourceGroupName, String w * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerDataInner get(String resourceGroupName, String workspaceName, String name) { + public CodeContainerInner get(String resourceGroupName, String workspaceName, String name) { return getAsync(resourceGroupName, workspaceName, name).block(); } @@ -645,7 +645,7 @@ public CodeContainerDataInner get(String resourceGroupName, String workspaceName * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } @@ -664,8 +664,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -726,8 +726,8 @@ private Mono> createOrUpdateWithResponseAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -783,8 +783,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -802,8 +802,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body) { + public CodeContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); } @@ -821,8 +821,8 @@ public CodeContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body, Context context) { + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } @@ -837,7 +837,7 @@ public Response createOrUpdateWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -850,7 +850,7 @@ private Mono> listNextSinglePageAsync(Stri final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -874,7 +874,7 @@ private Mono> listNextSinglePageAsync(Stri * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index efa1413b9df65..a51ea21126ee7 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerData; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; +import com.azure.resourcemanager.machinelearning.models.CodeContainer; import com.azure.resourcemanager.machinelearning.models.CodeContainers; public final class CodeContainersImpl implements CodeContainers { @@ -28,16 +28,16 @@ public CodeContainersImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new CodeContainerDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return Utils.mapPage(inner, inner1 -> new CodeContainerDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -49,31 +49,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } - public CodeContainerData get(String resourceGroupName, String workspaceName, String name) { - CodeContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public CodeContainer get(String resourceGroupName, String workspaceName, String name) { + CodeContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { - return new CodeContainerDataImpl(inner, this.manager()); + return new CodeContainerImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeContainerDataImpl(inner.getValue(), this.manager())); + new CodeContainerImpl(inner.getValue(), this.manager())); } else { return null; } } - public CodeContainerData getById(String id) { + public CodeContainer getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -99,7 +99,7 @@ public CodeContainerData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -185,7 +185,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public CodeContainerDataImpl define(String name) { - return new CodeContainerDataImpl(name, this.manager()); + 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/CodeVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java index ab51389d986e8..daab7505f3ff6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java @@ -6,12 +6,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionData; -import com.azure.resourcemanager.machinelearning.models.CodeVersionDetails; +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 CodeVersionDataImpl implements CodeVersionData, CodeVersionData.Definition, CodeVersionData.Update { - private CodeVersionDataInner innerObject; +public final class CodeVersionImpl implements CodeVersion, CodeVersion.Definition, CodeVersion.Update { + private CodeVersionInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -27,7 +27,7 @@ public String type() { return this.innerModel().type(); } - public CodeVersionDetails properties() { + public CodeVersionProperties properties() { return this.innerModel().properties(); } @@ -39,7 +39,7 @@ public String resourceGroupName() { return resourceGroupName; } - public CodeVersionDataInner innerModel() { + public CodeVersionInner innerModel() { return this.innerObject; } @@ -55,14 +55,14 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String version; - public CodeVersionDataImpl withExistingCode(String resourceGroupName, String workspaceName, String name) { + public CodeVersionImpl withExistingCode(String resourceGroupName, String workspaceName, String name) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; this.name = name; return this; } - public CodeVersionData create() { + public CodeVersion create() { this.innerObject = serviceManager .serviceClient() @@ -73,7 +73,7 @@ public CodeVersionData create() { return this; } - public CodeVersionData create(Context context) { + public CodeVersion create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -83,17 +83,17 @@ public CodeVersionData create(Context context) { return this; } - CodeVersionDataImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeVersionDataInner(); + CodeVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new CodeVersionInner(); this.serviceManager = serviceManager; this.version = name; } - public CodeVersionDataImpl update() { + public CodeVersionImpl update() { return this; } - public CodeVersionData apply() { + public CodeVersion apply() { this.innerObject = serviceManager .serviceClient() @@ -104,7 +104,7 @@ public CodeVersionData apply() { return this; } - public CodeVersionData apply(Context context) { + public CodeVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -114,9 +114,8 @@ public CodeVersionData apply(Context context) { return this; } - CodeVersionDataImpl( - CodeVersionDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + CodeVersionImpl( + CodeVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -125,7 +124,7 @@ public CodeVersionData apply(Context context) { this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public CodeVersionData refresh() { + public CodeVersion refresh() { this.innerObject = serviceManager .serviceClient() @@ -135,7 +134,7 @@ public CodeVersionData refresh() { return this; } - public CodeVersionData refresh(Context context) { + public CodeVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -145,7 +144,7 @@ public CodeVersionData refresh(Context context) { return this; } - public CodeVersionDataImpl withProperties(CodeVersionDetails properties) { + 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 index c63458b8eaf4d..12a8a001c5b37 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; import reactor.core.publisher.Mono; @@ -101,7 +101,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -118,7 +118,7 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -126,7 +126,7 @@ Mono> createOrUpdate( @PathParam("name") String name, @PathParam("version") String version, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CodeVersionDataInner body, + @BodyParam("application/json") CodeVersionInner body, @HeaderParam("Accept") String accept, Context context); @@ -157,7 +157,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, String orderBy, Integer top, String skip) { if (this.client.getEndpoint() == null) { return Mono @@ -198,7 +198,7 @@ private Mono> listSinglePageAsync( skip, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -227,7 +227,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -298,7 +298,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + 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), @@ -317,7 +317,7 @@ private PagedFlux listAsync( * @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) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -342,7 +342,7 @@ private PagedFlux listAsync(String resourceGroupName, Stri * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -367,7 +367,7 @@ private PagedFlux listAsync( * @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) { + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -390,7 +390,7 @@ public PagedIterable list(String resourceGroupName, String * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -581,7 +581,7 @@ public Response deleteWithResponse( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version) { if (this.client.getEndpoint() == null) { return Mono @@ -640,7 +640,7 @@ private Mono> getWithResponseAsync( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -695,7 +695,7 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono getAsync( String resourceGroupName, String workspaceName, String name, String version) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -714,7 +714,7 @@ private Mono getAsync( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { + public CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { return getAsync(resourceGroupName, workspaceName, name, version).block(); } @@ -732,7 +732,7 @@ public CodeVersionDataInner get(String resourceGroupName, String workspaceName, * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } @@ -752,8 +752,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -819,12 +819,12 @@ private Mono> createOrUpdateWithResponseAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, - CodeVersionDataInner body, + CodeVersionInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -886,8 +886,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionDataInner body) { + 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())); } @@ -906,8 +906,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionDataInner body) { + public CodeVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); } @@ -926,12 +926,12 @@ public CodeVersionDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - CodeVersionDataInner body, + CodeVersionInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } @@ -947,7 +947,7 @@ public Response createOrUpdateWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -960,7 +960,7 @@ private Mono> listNextSinglePageAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -984,7 +984,7 @@ private Mono> listNextSinglePageAsync(String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index a3fb6e2470b43..4941ec69c104b 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionData; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.models.CodeVersion; import com.azure.resourcemanager.machinelearning.models.CodeVersions; public final class CodeVersionsImpl implements CodeVersions { @@ -28,12 +28,12 @@ public CodeVersionsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new CodeVersionDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -41,9 +41,9 @@ public PagedIterable list( Integer top, String skip, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new CodeVersionDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name, String version) { @@ -55,31 +55,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } - public CodeVersionData get(String resourceGroupName, String workspaceName, String name, String version) { - CodeVersionDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + 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 CodeVersionDataImpl(inner, this.manager()); + return new CodeVersionImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeVersionDataImpl(inner.getValue(), this.manager())); + new CodeVersionImpl(inner.getValue(), this.manager())); } else { return null; } } - public CodeVersionData getById(String id) { + public CodeVersion getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -112,7 +112,7 @@ public CodeVersionData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -219,7 +219,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public CodeVersionDataImpl define(String name) { - return new CodeVersionDataImpl(name, this.manager()); + 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/ComponentContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java index 261dd297a33f6..0208215c0403c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java @@ -6,13 +6,13 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerData; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerDetails; +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 ComponentContainerDataImpl - implements ComponentContainerData, ComponentContainerData.Definition, ComponentContainerData.Update { - private ComponentContainerDataInner innerObject; +public final class ComponentContainerImpl + implements ComponentContainer, ComponentContainer.Definition, ComponentContainer.Update { + private ComponentContainerInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +28,7 @@ public String type() { return this.innerModel().type(); } - public ComponentContainerDetails properties() { + public ComponentContainerProperties properties() { return this.innerModel().properties(); } @@ -40,7 +40,7 @@ public String resourceGroupName() { return resourceGroupName; } - public ComponentContainerDataInner innerModel() { + public ComponentContainerInner innerModel() { return this.innerObject; } @@ -54,13 +54,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String name; - public ComponentContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public ComponentContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public ComponentContainerData create() { + public ComponentContainer create() { this.innerObject = serviceManager .serviceClient() @@ -70,7 +70,7 @@ public ComponentContainerData create() { return this; } - public ComponentContainerData create(Context context) { + public ComponentContainer create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -80,18 +80,18 @@ public ComponentContainerData create(Context context) { return this; } - ComponentContainerDataImpl( + ComponentContainerImpl( String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComponentContainerDataInner(); + this.innerObject = new ComponentContainerInner(); this.serviceManager = serviceManager; this.name = name; } - public ComponentContainerDataImpl update() { + public ComponentContainerImpl update() { return this; } - public ComponentContainerData apply() { + public ComponentContainer apply() { this.innerObject = serviceManager .serviceClient() @@ -101,7 +101,7 @@ public ComponentContainerData apply() { return this; } - public ComponentContainerData apply(Context context) { + public ComponentContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -111,8 +111,8 @@ public ComponentContainerData apply(Context context) { return this; } - ComponentContainerDataImpl( - ComponentContainerDataInner innerObject, + ComponentContainerImpl( + ComponentContainerInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -121,7 +121,7 @@ public ComponentContainerData apply(Context context) { this.name = Utils.getValueFromIdByName(innerObject.id(), "components"); } - public ComponentContainerData refresh() { + public ComponentContainer refresh() { this.innerObject = serviceManager .serviceClient() @@ -131,7 +131,7 @@ public ComponentContainerData refresh() { return this; } - public ComponentContainerData refresh(Context context) { + public ComponentContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -141,7 +141,7 @@ public ComponentContainerData refresh(Context context) { return this; } - public ComponentContainerDataImpl withProperties(ComponentContainerDetails properties) { + 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 index 98f26e17277e2..04e315075adf5 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -99,7 +99,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -115,14 +115,14 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComponentContainerDataInner body, + @BodyParam("application/json") ComponentContainerInner body, @HeaderParam("Accept") String accept, Context context); @@ -151,7 +151,7 @@ Mono> listNext( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { if (this.client.getEndpoint() == null) { return Mono @@ -187,7 +187,7 @@ private Mono> listSinglePageAsync( listViewType, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -214,7 +214,7 @@ private Mono> listSinglePageAsync( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -272,7 +272,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), @@ -290,7 +290,7 @@ private PagedFlux listAsync( * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; return new PagedFlux<>( @@ -312,7 +312,7 @@ private PagedFlux listAsync(String resourceGroupNam * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), @@ -330,7 +330,7 @@ private PagedFlux listAsync( * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); @@ -350,7 +350,7 @@ public PagedIterable list(String resourceGroupName, * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); } @@ -519,7 +519,7 @@ public Response deleteWithResponse( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name) { if (this.client.getEndpoint() == null) { return Mono @@ -573,7 +573,7 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -623,7 +623,7 @@ private Mono> getWithResponseAsync( * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { return getWithResponseAsync(resourceGroupName, workspaceName, name) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -640,7 +640,7 @@ private Mono getAsync(String resourceGroupName, Str * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerDataInner get(String resourceGroupName, String workspaceName, String name) { + public ComponentContainerInner get(String resourceGroupName, String workspaceName, String name) { return getAsync(resourceGroupName, workspaceName, name).block(); } @@ -657,7 +657,7 @@ public ComponentContainerDataInner get(String resourceGroupName, String workspac * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } @@ -676,8 +676,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -738,12 +738,8 @@ private Mono> createOrUpdateWithResponseAs * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - ComponentContainerDataInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -799,8 +795,8 @@ private Mono> createOrUpdateWithResponseAs * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner body) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -818,8 +814,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner body) { + public ComponentContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); } @@ -837,12 +833,8 @@ public ComponentContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ComponentContainerDataInner body, - Context context) { + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } @@ -857,7 +849,7 @@ public Response createOrUpdateWithResponse( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -870,7 +862,7 @@ private Mono> listNextSinglePageAsync final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -894,7 +886,7 @@ private Mono> listNextSinglePageAsync * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index 932afbcbf09f3..e32fe6d4064f6 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerData; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ComponentContainer; import com.azure.resourcemanager.machinelearning.models.ComponentContainers; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -29,16 +29,16 @@ public ComponentContainersImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ComponentContainerDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ComponentContainerDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -50,31 +50,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } - public ComponentContainerData get(String resourceGroupName, String workspaceName, String name) { - ComponentContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public ComponentContainer get(String resourceGroupName, String workspaceName, String name) { + ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { - return new ComponentContainerDataImpl(inner, this.manager()); + return new ComponentContainerImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentContainerDataImpl(inner.getValue(), this.manager())); + new ComponentContainerImpl(inner.getValue(), this.manager())); } else { return null; } } - public ComponentContainerData getById(String id) { + public ComponentContainer getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -100,7 +100,7 @@ public ComponentContainerData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -186,7 +186,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public ComponentContainerDataImpl define(String name) { - return new ComponentContainerDataImpl(name, this.manager()); + 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/ComponentVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java index b945042188db0..2b90ee811ddbd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java @@ -6,13 +6,13 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionData; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionDetails; +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 ComponentVersionDataImpl - implements ComponentVersionData, ComponentVersionData.Definition, ComponentVersionData.Update { - private ComponentVersionDataInner innerObject; +public final class ComponentVersionImpl + implements ComponentVersion, ComponentVersion.Definition, ComponentVersion.Update { + private ComponentVersionInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +28,7 @@ public String type() { return this.innerModel().type(); } - public ComponentVersionDetails properties() { + public ComponentVersionProperties properties() { return this.innerModel().properties(); } @@ -40,7 +40,7 @@ public String resourceGroupName() { return resourceGroupName; } - public ComponentVersionDataInner innerModel() { + public ComponentVersionInner innerModel() { return this.innerObject; } @@ -56,14 +56,14 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String version; - public ComponentVersionDataImpl withExistingComponent(String resourceGroupName, String workspaceName, String name) { + public ComponentVersionImpl withExistingComponent(String resourceGroupName, String workspaceName, String name) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; this.name = name; return this; } - public ComponentVersionData create() { + public ComponentVersion create() { this.innerObject = serviceManager .serviceClient() @@ -74,7 +74,7 @@ public ComponentVersionData create() { return this; } - public ComponentVersionData create(Context context) { + public ComponentVersion create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -84,18 +84,17 @@ public ComponentVersionData create(Context context) { return this; } - ComponentVersionDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComponentVersionDataInner(); + ComponentVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new ComponentVersionInner(); this.serviceManager = serviceManager; this.version = name; } - public ComponentVersionDataImpl update() { + public ComponentVersionImpl update() { return this; } - public ComponentVersionData apply() { + public ComponentVersion apply() { this.innerObject = serviceManager .serviceClient() @@ -106,7 +105,7 @@ public ComponentVersionData apply() { return this; } - public ComponentVersionData apply(Context context) { + public ComponentVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -116,8 +115,8 @@ public ComponentVersionData apply(Context context) { return this; } - ComponentVersionDataImpl( - ComponentVersionDataInner innerObject, + ComponentVersionImpl( + ComponentVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -127,7 +126,7 @@ public ComponentVersionData apply(Context context) { this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public ComponentVersionData refresh() { + public ComponentVersion refresh() { this.innerObject = serviceManager .serviceClient() @@ -137,7 +136,7 @@ public ComponentVersionData refresh() { return this; } - public ComponentVersionData refresh(Context context) { + public ComponentVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -147,7 +146,7 @@ public ComponentVersionData refresh(Context context) { return this; } - public ComponentVersionDataImpl withProperties(ComponentVersionDetails properties) { + 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 index e0d37d18b8f1f..cb677f03217ab 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -103,7 +103,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -120,7 +120,7 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -128,7 +128,7 @@ Mono> createOrUpdate( @PathParam("name") String name, @PathParam("version") String version, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComponentVersionDataInner body, + @BodyParam("application/json") ComponentVersionInner body, @HeaderParam("Accept") String accept, Context context); @@ -160,7 +160,7 @@ Mono> listNext( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -208,7 +208,7 @@ private Mono> listSinglePageAsync( listViewType, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -238,7 +238,7 @@ private Mono> listSinglePageAsync( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -312,7 +312,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -337,8 +337,7 @@ private PagedFlux listAsync( * @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) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -365,7 +364,7 @@ private PagedFlux listAsync( * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -392,7 +391,7 @@ private PagedFlux listAsync( * @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) { + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -417,7 +416,7 @@ public PagedIterable list(String resourceGroupName, S * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -610,7 +609,7 @@ public Response deleteWithResponse( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version) { if (this.client.getEndpoint() == null) { return Mono @@ -669,7 +668,7 @@ private Mono> getWithResponseAsync( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -724,7 +723,7 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono getAsync( String resourceGroupName, String workspaceName, String name, String version) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -743,7 +742,7 @@ private Mono getAsync( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { + public ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { return getAsync(resourceGroupName, workspaceName, name, version).block(); } @@ -761,7 +760,7 @@ public ComponentVersionDataInner get(String resourceGroupName, String workspaceN * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } @@ -781,8 +780,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -848,12 +847,12 @@ private Mono> createOrUpdateWithResponseAsyn * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, - ComponentVersionDataInner body, + ComponentVersionInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -915,8 +914,8 @@ private Mono> createOrUpdateWithResponseAsyn * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionDataInner body) { + 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())); } @@ -935,8 +934,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionDataInner body) { + public ComponentVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); } @@ -955,12 +954,12 @@ public ComponentVersionDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - ComponentVersionDataInner body, + ComponentVersionInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } @@ -976,7 +975,7 @@ public Response createOrUpdateWithResponse( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -989,7 +988,7 @@ private Mono> listNextSinglePageAsync(S final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1013,7 +1012,7 @@ private Mono> listNextSinglePageAsync(S * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index b72d5d00a9567..28fc4ea029110 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionData; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ComponentVersion; import com.azure.resourcemanager.machinelearning.models.ComponentVersions; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -29,13 +29,12 @@ public ComponentVersionsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new ComponentVersionDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -44,11 +43,11 @@ public PagedIterable list( String skip, ListViewType listViewType, Context context) { - PagedIterable inner = + PagedIterable inner = this .serviceClient() .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ComponentVersionDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name, String version) { @@ -60,31 +59,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } - public ComponentVersionData get(String resourceGroupName, String workspaceName, String name, String version) { - ComponentVersionDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + 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 ComponentVersionDataImpl(inner, this.manager()); + return new ComponentVersionImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentVersionDataImpl(inner.getValue(), this.manager())); + new ComponentVersionImpl(inner.getValue(), this.manager())); } else { return null; } } - public ComponentVersionData getById(String id) { + public ComponentVersion getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -117,7 +116,7 @@ public ComponentVersionData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -224,7 +223,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public ComponentVersionDataImpl define(String name) { - return new ComponentVersionDataImpl(name, this.manager()); + 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 index 4f60b2c8c375d..beb513985264c 100644 --- 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 @@ -15,10 +15,13 @@ 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.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; 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.List; import java.util.Map; public final class ComputeResourceImpl implements ComputeResource, ComputeResource.Definition, ComputeResource.Update { @@ -178,6 +181,16 @@ public ComputeResource refresh(Context context) { return this; } + public void updateCustomServices(List customServices) { + serviceManager.computes().updateCustomServices(resourceGroupName, workspaceName, computeName, customServices); + } + + public Response updateCustomServicesWithResponse(List customServices, Context context) { + return serviceManager + .computes() + .updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, context); + } + public PagedIterable listNodes() { return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName); } @@ -218,6 +231,16 @@ public void restart(Context context) { serviceManager.computes().restart(resourceGroupName, workspaceName, computeName, context); } + public void updateIdleShutdownSetting(IdleShutdownSetting parameters) { + serviceManager.computes().updateIdleShutdownSetting(resourceGroupName, workspaceName, computeName, parameters); + } + + public Response updateIdleShutdownSettingWithResponse(IdleShutdownSetting parameters, Context context) { + return serviceManager + .computes() + .updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + } + public ComputeResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; 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 index 7133570caee08..b5878de9129e6 100644 --- 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 @@ -39,9 +39,12 @@ 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.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; import com.azure.resourcemanager.machinelearning.models.PaginatedComputeResourcesList; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; import java.nio.ByteBuffer; +import java.util.List; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -153,6 +156,23 @@ Mono>> delete( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateCustomServices( + @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") List customServices, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -233,6 +253,24 @@ Mono>> restart( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}" + + "/updateIdleShutdownSetting") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateIdleShutdownSetting( + @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") IdleShutdownSetting parameters, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1586,6 +1624,189 @@ public void delete( deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).block(); } + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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> updateCustomServicesWithResponseAsync( + String resourceGroupName, String workspaceName, String computeName, List customServices) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter 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 (customServices == null) { + return Mono.error(new IllegalArgumentException("Parameter customServices is required and cannot be null.")); + } else { + customServices.forEach(e -> e.validate()); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateCustomServices( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + computeName, + this.client.getApiVersion(), + customServices, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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> updateCustomServicesWithResponseAsync( + String resourceGroupName, + String workspaceName, + String computeName, + List customServices, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter 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 (customServices == null) { + return Mono.error(new IllegalArgumentException("Parameter customServices is required and cannot be null.")); + } else { + customServices.forEach(e -> e.validate()); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateCustomServices( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + computeName, + this.client.getApiVersion(), + customServices, + accept, + context); + } + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 updateCustomServicesAsync( + String resourceGroupName, String workspaceName, String computeName, List customServices) { + return updateCustomServicesWithResponseAsync(resourceGroupName, workspaceName, computeName, customServices) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 updateCustomServices( + String resourceGroupName, String workspaceName, String computeName, List customServices) { + updateCustomServicesAsync(resourceGroupName, workspaceName, computeName, customServices).block(); + } + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 updateCustomServicesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + List customServices, + Context context) { + return updateCustomServicesWithResponseAsync( + resourceGroupName, workspaceName, computeName, customServices, context) + .block(); + } + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -2702,6 +2923,189 @@ public void restart(String resourceGroupName, String workspaceName, String compu restartAsync(resourceGroupName, workspaceName, computeName, context).block(); } + /** + * Updates the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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> updateIdleShutdownSettingWithResponseAsync( + String resourceGroupName, String workspaceName, String computeName, IdleShutdownSetting 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 + .updateIdleShutdownSetting( + 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 the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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> updateIdleShutdownSettingWithResponseAsync( + String resourceGroupName, + String workspaceName, + String computeName, + IdleShutdownSetting 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 + .updateIdleShutdownSetting( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + computeName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Updates the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 updateIdleShutdownSettingAsync( + String resourceGroupName, String workspaceName, String computeName, IdleShutdownSetting parameters) { + return updateIdleShutdownSettingWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Updates the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 updateIdleShutdownSetting( + String resourceGroupName, String workspaceName, String computeName, IdleShutdownSetting parameters) { + updateIdleShutdownSettingAsync(resourceGroupName, workspaceName, computeName, parameters).block(); + } + + /** + * Updates the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 updateIdleShutdownSettingWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + IdleShutdownSetting parameters, + Context context) { + return updateIdleShutdownSettingWithResponseAsync( + resourceGroupName, workspaceName, computeName, parameters, context) + .block(); + } + /** * Get the next page of items. * 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 index ade86e3600ec7..0142f636a4f35 100644 --- 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 @@ -16,7 +16,10 @@ 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.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; +import java.util.List; public final class ComputesImpl implements Computes { private static final ClientLogger LOGGER = new ClientLogger(ComputesImpl.class); @@ -84,6 +87,22 @@ public void delete( this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); } + public void updateCustomServices( + String resourceGroupName, String workspaceName, String computeName, List customServices) { + this.serviceClient().updateCustomServices(resourceGroupName, workspaceName, computeName, customServices); + } + + public Response updateCustomServicesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + List customServices, + Context context) { + return this + .serviceClient() + .updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, context); + } + public PagedIterable listNodes( String resourceGroupName, String workspaceName, String computeName) { return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName); @@ -142,6 +161,22 @@ public void restart(String resourceGroupName, String workspaceName, String compu this.serviceClient().restart(resourceGroupName, workspaceName, computeName, context); } + public void updateIdleShutdownSetting( + String resourceGroupName, String workspaceName, String computeName, IdleShutdownSetting parameters) { + this.serviceClient().updateIdleShutdownSetting(resourceGroupName, workspaceName, computeName, parameters); + } + + public Response updateIdleShutdownSettingWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + IdleShutdownSetting parameters, + Context context) { + return this + .serviceClient() + .updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + } + public ComputeResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java index 96583e6a09c9e..226bd04ddbb2d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java @@ -6,13 +6,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerData; -import com.azure.resourcemanager.machinelearning.models.DataContainerDetails; +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 DataContainerDataImpl - implements DataContainerData, DataContainerData.Definition, DataContainerData.Update { - private DataContainerDataInner innerObject; +public final class DataContainerImpl implements DataContainer, DataContainer.Definition, DataContainer.Update { + private DataContainerInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +27,7 @@ public String type() { return this.innerModel().type(); } - public DataContainerDetails properties() { + public DataContainerProperties properties() { return this.innerModel().properties(); } @@ -40,7 +39,7 @@ public String resourceGroupName() { return resourceGroupName; } - public DataContainerDataInner innerModel() { + public DataContainerInner innerModel() { return this.innerObject; } @@ -54,13 +53,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String name; - public DataContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public DataContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public DataContainerData create() { + public DataContainer create() { this.innerObject = serviceManager .serviceClient() @@ -70,7 +69,7 @@ public DataContainerData create() { return this; } - public DataContainerData create(Context context) { + public DataContainer create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -80,18 +79,17 @@ public DataContainerData create(Context context) { return this; } - DataContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DataContainerDataInner(); + DataContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new DataContainerInner(); this.serviceManager = serviceManager; this.name = name; } - public DataContainerDataImpl update() { + public DataContainerImpl update() { return this; } - public DataContainerData apply() { + public DataContainer apply() { this.innerObject = serviceManager .serviceClient() @@ -101,7 +99,7 @@ public DataContainerData apply() { return this; } - public DataContainerData apply(Context context) { + public DataContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -111,8 +109,8 @@ public DataContainerData apply(Context context) { return this; } - DataContainerDataImpl( - DataContainerDataInner innerObject, + DataContainerImpl( + DataContainerInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -121,7 +119,7 @@ public DataContainerData apply(Context context) { this.name = Utils.getValueFromIdByName(innerObject.id(), "data"); } - public DataContainerData refresh() { + public DataContainer refresh() { this.innerObject = serviceManager .serviceClient() @@ -131,7 +129,7 @@ public DataContainerData refresh() { return this; } - public DataContainerData refresh(Context context) { + public DataContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -141,7 +139,7 @@ public DataContainerData refresh(Context context) { return this; } - public DataContainerDataImpl withProperties(DataContainerDetails properties) { + 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 index b2bdd57b5e675..c1edd6ccc0b2c 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -99,7 +99,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -115,14 +115,14 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataContainerDataInner body, + @BodyParam("application/json") DataContainerInner body, @HeaderParam("Accept") String accept, Context context); @@ -151,7 +151,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { if (this.client.getEndpoint() == null) { return Mono @@ -187,7 +187,7 @@ private Mono> listSinglePageAsync( listViewType, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -214,7 +214,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -272,7 +272,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), @@ -290,7 +290,7 @@ private PagedFlux listAsync( * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; return new PagedFlux<>( @@ -312,7 +312,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), @@ -330,7 +330,7 @@ private PagedFlux listAsync( * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); @@ -350,7 +350,7 @@ public PagedIterable list(String resourceGroupName, Stri * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); } @@ -519,7 +519,7 @@ public Response deleteWithResponse( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name) { if (this.client.getEndpoint() == null) { return Mono @@ -573,7 +573,7 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -623,7 +623,7 @@ private Mono> getWithResponseAsync( * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { return getWithResponseAsync(resourceGroupName, workspaceName, name) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -640,7 +640,7 @@ private Mono getAsync(String resourceGroupName, String w * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerDataInner get(String resourceGroupName, String workspaceName, String name) { + public DataContainerInner get(String resourceGroupName, String workspaceName, String name) { return getAsync(resourceGroupName, workspaceName, name).block(); } @@ -657,7 +657,7 @@ public DataContainerDataInner get(String resourceGroupName, String workspaceName * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } @@ -676,8 +676,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, DataContainerInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -738,8 +738,8 @@ private Mono> createOrUpdateWithResponseAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -795,8 +795,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, DataContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -814,8 +814,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body) { + public DataContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, DataContainerInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); } @@ -833,8 +833,8 @@ public DataContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body, Context context) { + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } @@ -849,7 +849,7 @@ public Response createOrUpdateWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -862,7 +862,7 @@ private Mono> listNextSinglePageAsync(Stri final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -886,7 +886,7 @@ private Mono> listNextSinglePageAsync(Stri * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index a06835365fe66..aede6e38b03d1 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerData; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; +import com.azure.resourcemanager.machinelearning.models.DataContainer; import com.azure.resourcemanager.machinelearning.models.DataContainers; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -29,16 +29,16 @@ public DataContainersImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new DataContainerDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new DataContainerDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -50,31 +50,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } - public DataContainerData get(String resourceGroupName, String workspaceName, String name) { - DataContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public DataContainer get(String resourceGroupName, String workspaceName, String name) { + DataContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { - return new DataContainerDataImpl(inner, this.manager()); + return new DataContainerImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataContainerDataImpl(inner.getValue(), this.manager())); + new DataContainerImpl(inner.getValue(), this.manager())); } else { return null; } } - public DataContainerData getById(String id) { + public DataContainer getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -100,7 +100,7 @@ public DataContainerData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -186,7 +186,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public DataContainerDataImpl define(String name) { - return new DataContainerDataImpl(name, this.manager()); + 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/DataVersionBaseDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java index eb44fdf76cedd..00c2cd10b3754 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java @@ -6,13 +6,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseData; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseDetails; +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 DataVersionBaseDataImpl - implements DataVersionBaseData, DataVersionBaseData.Definition, DataVersionBaseData.Update { - private DataVersionBaseDataInner innerObject; +public final class DataVersionBaseImpl implements DataVersionBase, DataVersionBase.Definition, DataVersionBase.Update { + private DataVersionBaseInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +27,7 @@ public String type() { return this.innerModel().type(); } - public DataVersionBaseDetails properties() { + public DataVersionBaseProperties properties() { return this.innerModel().properties(); } @@ -40,7 +39,7 @@ public String resourceGroupName() { return resourceGroupName; } - public DataVersionBaseDataInner innerModel() { + public DataVersionBaseInner innerModel() { return this.innerObject; } @@ -56,14 +55,14 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String version; - public DataVersionBaseDataImpl withExistingData(String resourceGroupName, String workspaceName, String name) { + public DataVersionBaseImpl withExistingData(String resourceGroupName, String workspaceName, String name) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; this.name = name; return this; } - public DataVersionBaseData create() { + public DataVersionBase create() { this.innerObject = serviceManager .serviceClient() @@ -74,7 +73,7 @@ public DataVersionBaseData create() { return this; } - public DataVersionBaseData create(Context context) { + public DataVersionBase create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -84,18 +83,17 @@ public DataVersionBaseData create(Context context) { return this; } - DataVersionBaseDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DataVersionBaseDataInner(); + DataVersionBaseImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new DataVersionBaseInner(); this.serviceManager = serviceManager; this.version = name; } - public DataVersionBaseDataImpl update() { + public DataVersionBaseImpl update() { return this; } - public DataVersionBaseData apply() { + public DataVersionBase apply() { this.innerObject = serviceManager .serviceClient() @@ -106,7 +104,7 @@ public DataVersionBaseData apply() { return this; } - public DataVersionBaseData apply(Context context) { + public DataVersionBase apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -116,8 +114,8 @@ public DataVersionBaseData apply(Context context) { return this; } - DataVersionBaseDataImpl( - DataVersionBaseDataInner innerObject, + DataVersionBaseImpl( + DataVersionBaseInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -127,7 +125,7 @@ public DataVersionBaseData apply(Context context) { this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public DataVersionBaseData refresh() { + public DataVersionBase refresh() { this.innerObject = serviceManager .serviceClient() @@ -137,7 +135,7 @@ public DataVersionBaseData refresh() { return this; } - public DataVersionBaseData refresh(Context context) { + public DataVersionBase refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -147,7 +145,7 @@ public DataVersionBaseData refresh(Context context) { return this; } - public DataVersionBaseDataImpl withProperties(DataVersionBaseDetails properties) { + 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 index 020934963bfa3..33af672a7a7ec 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -104,7 +104,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -121,7 +121,7 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -129,7 +129,7 @@ Mono> createOrUpdate( @PathParam("name") String name, @PathParam("version") String version, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataVersionBaseDataInner body, + @BodyParam("application/json") DataVersionBaseInner body, @HeaderParam("Accept") String accept, Context context); @@ -164,7 +164,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -214,7 +214,7 @@ private Mono> listSinglePageAsync( listViewType, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -247,7 +247,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -326,7 +326,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -352,7 +352,7 @@ private PagedFlux listAsync( * @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) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -383,7 +383,7 @@ private PagedFlux listAsync(String resourceGroupName, * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -412,7 +412,7 @@ private PagedFlux listAsync( * @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) { + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -442,7 +442,7 @@ public PagedIterable list(String resourceGroupName, St * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -636,7 +636,7 @@ public Response deleteWithResponse( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version) { if (this.client.getEndpoint() == null) { return Mono @@ -695,7 +695,7 @@ private Mono> getWithResponseAsync( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -750,7 +750,7 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono getAsync( String resourceGroupName, String workspaceName, String name, String version) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -769,7 +769,7 @@ private Mono getAsync( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseDataInner get(String resourceGroupName, String workspaceName, String name, String version) { + public DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version) { return getAsync(resourceGroupName, workspaceName, name, version).block(); } @@ -787,7 +787,7 @@ public DataVersionBaseDataInner get(String resourceGroupName, String workspaceNa * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } @@ -807,8 +807,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -874,12 +874,12 @@ private Mono> createOrUpdateWithResponseAsync * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, - DataVersionBaseDataInner body, + DataVersionBaseInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -941,8 +941,8 @@ private Mono> createOrUpdateWithResponseAsync * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseDataInner body) { + 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())); } @@ -961,8 +961,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseDataInner body) { + public DataVersionBaseInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); } @@ -981,12 +981,12 @@ public DataVersionBaseDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - DataVersionBaseDataInner body, + DataVersionBaseInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } @@ -1002,7 +1002,7 @@ public Response createOrUpdateWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1015,7 +1015,7 @@ private Mono> listNextSinglePageAsync(St final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1039,7 +1039,7 @@ private Mono> listNextSinglePageAsync(St * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index 2b82c582e9d66..8787e321745ab 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseData; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; +import com.azure.resourcemanager.machinelearning.models.DataVersionBase; import com.azure.resourcemanager.machinelearning.models.DataVersions; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -29,13 +29,12 @@ public DataVersionsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new DataVersionBaseDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -45,11 +44,11 @@ public PagedIterable list( String tags, ListViewType listViewType, Context context) { - PagedIterable inner = + PagedIterable inner = this .serviceClient() .list(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context); - return Utils.mapPage(inner, inner1 -> new DataVersionBaseDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name, String version) { @@ -61,31 +60,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } - public DataVersionBaseData get(String resourceGroupName, String workspaceName, String name, String version) { - DataVersionBaseDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + 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 DataVersionBaseDataImpl(inner, this.manager()); + return new DataVersionBaseImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataVersionBaseDataImpl(inner.getValue(), this.manager())); + new DataVersionBaseImpl(inner.getValue(), this.manager())); } else { return null; } } - public DataVersionBaseData getById(String id) { + public DataVersionBase getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -118,7 +117,7 @@ public DataVersionBaseData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -225,7 +224,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public DataVersionBaseDataImpl define(String name) { - return new DataVersionBaseDataImpl(name, this.manager()); + 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/DatastoreDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java similarity index 80% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java index 21f1d2667452a..7c6f46611bee9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java @@ -7,13 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreData; -import com.azure.resourcemanager.machinelearning.models.DatastoreDetails; +import com.azure.resourcemanager.machinelearning.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 DatastoreDataImpl implements DatastoreData, DatastoreData.Definition, DatastoreData.Update { - private DatastoreDataInner innerObject; +public final class DatastoreImpl implements Datastore, Datastore.Definition, Datastore.Update { + private DatastoreInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -29,7 +29,7 @@ public String type() { return this.innerModel().type(); } - public DatastoreDetails properties() { + public DatastoreProperties properties() { return this.innerModel().properties(); } @@ -41,7 +41,7 @@ public String resourceGroupName() { return resourceGroupName; } - public DatastoreDataInner innerModel() { + public DatastoreInner innerModel() { return this.innerObject; } @@ -59,13 +59,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private Boolean updateSkipValidation; - public DatastoreDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public DatastoreImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public DatastoreData create() { + public Datastore create() { this.innerObject = serviceManager .serviceClient() @@ -76,7 +76,7 @@ public DatastoreData create() { return this; } - public DatastoreData create(Context context) { + public Datastore create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -87,19 +87,19 @@ public DatastoreData create(Context context) { return this; } - DatastoreDataImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DatastoreDataInner(); + DatastoreImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new DatastoreInner(); this.serviceManager = serviceManager; this.name = name; this.createSkipValidation = null; } - public DatastoreDataImpl update() { + public DatastoreImpl update() { this.updateSkipValidation = null; return this; } - public DatastoreData apply() { + public Datastore apply() { this.innerObject = serviceManager .serviceClient() @@ -110,7 +110,7 @@ public DatastoreData apply() { return this; } - public DatastoreData apply(Context context) { + public Datastore apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -121,9 +121,8 @@ public DatastoreData apply(Context context) { return this; } - DatastoreDataImpl( - DatastoreDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + DatastoreImpl( + DatastoreInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -131,7 +130,7 @@ public DatastoreData apply(Context context) { this.name = Utils.getValueFromIdByName(innerObject.id(), "datastores"); } - public DatastoreData refresh() { + public Datastore refresh() { this.innerObject = serviceManager .serviceClient() @@ -141,7 +140,7 @@ public DatastoreData refresh() { return this; } - public DatastoreData refresh(Context context) { + public Datastore refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -159,12 +158,12 @@ public Response listSecretsWithResponse(Context context) { return serviceManager.datastores().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); } - public DatastoreDataImpl withProperties(DatastoreDetails properties) { + public DatastoreImpl withProperties(DatastoreProperties properties) { this.innerModel().withProperties(properties); return this; } - public DatastoreDataImpl withSkipValidation(Boolean skipValidation) { + public DatastoreImpl withSkipValidation(Boolean skipValidation) { if (isInCreateMode()) { this.createSkipValidation = skipValidation; return this; 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 index 8191aaa912b5e..b9d940c89d608 100644 --- 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 @@ -29,13 +29,13 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.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. */ @@ -108,7 +108,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -124,7 +124,7 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -132,7 +132,7 @@ Mono> createOrUpdate( @PathParam("name") String name, @QueryParam("api-version") String apiVersion, @QueryParam("skipValidation") Boolean skipValidation, - @BodyParam("application/json") DatastoreDataInner body, + @BodyParam("application/json") DatastoreInner body, @HeaderParam("Accept") String accept, Context context); @@ -182,7 +182,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, @@ -213,7 +213,9 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; String namesConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(names, CollectionFormat.CSV); + (names == null) + ? null + : names.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); return FluxUtil .withContext( context -> @@ -233,7 +235,7 @@ private Mono> listSinglePageAsync( orderByAsc, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -265,7 +267,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, @@ -297,7 +299,9 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; String namesConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(names, CollectionFormat.CSV); + (names == null) + ? null + : names.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); context = this.client.mergeContext(context); return service .list( @@ -344,7 +348,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, @@ -372,7 +376,7 @@ private PagedFlux listAsync( * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final Integer count = null; final Boolean isDefault = null; @@ -406,7 +410,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, @@ -444,7 +448,7 @@ private PagedFlux listAsync( * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; final Integer count = null; final Boolean isDefault = null; @@ -476,7 +480,7 @@ public PagedIterable list(String resourceGroupName, String w * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -665,7 +669,7 @@ public Response deleteWithResponse( * @return datastore along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name) { if (this.client.getEndpoint() == null) { return Mono @@ -719,7 +723,7 @@ private Mono> getWithResponseAsync( * @return datastore along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -769,7 +773,7 @@ private Mono> getWithResponseAsync( * @return datastore on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { return getWithResponseAsync(resourceGroupName, workspaceName, name) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -786,7 +790,7 @@ private Mono getAsync(String resourceGroupName, String works * @return datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreDataInner get(String resourceGroupName, String workspaceName, String name) { + public DatastoreInner get(String resourceGroupName, String workspaceName, String name) { return getAsync(resourceGroupName, workspaceName, name).block(); } @@ -803,7 +807,7 @@ public DatastoreDataInner get(String resourceGroupName, String workspaceName, St * @return datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } @@ -823,8 +827,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body, Boolean skipValidation) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, DatastoreInner body, Boolean skipValidation) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -887,11 +891,11 @@ private Mono> createOrUpdateWithResponseAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String name, - DatastoreDataInner body, + DatastoreInner body, Boolean skipValidation, Context context) { if (this.client.getEndpoint() == null) { @@ -951,8 +955,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body, Boolean skipValidation) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, DatastoreInner body, Boolean skipValidation) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -970,8 +974,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body) { + 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())); @@ -990,8 +994,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body) { + public DatastoreInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, DatastoreInner body) { final Boolean skipValidation = null; return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, skipValidation).block(); } @@ -1011,11 +1015,11 @@ public DatastoreDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, - DatastoreDataInner body, + DatastoreInner body, Boolean skipValidation, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation, context) @@ -1188,7 +1192,7 @@ public Response listSecretsWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1201,7 +1205,7 @@ private Mono> listNextSinglePageAsync(String n final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1225,7 +1229,7 @@ private Mono> listNextSinglePageAsync(String n * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index 376f7c9a45ff0..e6530a0d68d12 100644 --- 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 @@ -10,9 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreData; +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; @@ -30,12 +30,12 @@ public DatastoresImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new DatastoreDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -46,7 +46,7 @@ public PagedIterable list( String orderBy, Boolean orderByAsc, Context context) { - PagedIterable inner = + PagedIterable inner = this .serviceClient() .list( @@ -60,7 +60,7 @@ public PagedIterable list( orderBy, orderByAsc, context); - return Utils.mapPage(inner, inner1 -> new DatastoreDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -72,25 +72,25 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } - public DatastoreData get(String resourceGroupName, String workspaceName, String name) { - DatastoreDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public Datastore get(String resourceGroupName, String workspaceName, String name) { + DatastoreInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { - return new DatastoreDataImpl(inner, this.manager()); + return new DatastoreImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DatastoreDataImpl(inner.getValue(), this.manager())); + new DatastoreImpl(inner.getValue(), this.manager())); } else { return null; } @@ -120,7 +120,7 @@ public Response listSecretsWithResponse( } } - public DatastoreData getById(String id) { + public Datastore getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -146,7 +146,7 @@ public DatastoreData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -232,7 +232,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public DatastoreDataImpl define(String name) { - return new DatastoreDataImpl(name, this.manager()); + 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/EnvironmentContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java index b634d9599dafc..4ee12b6fd24e6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java @@ -6,13 +6,13 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerData; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerDetails; +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 EnvironmentContainerDataImpl - implements EnvironmentContainerData, EnvironmentContainerData.Definition, EnvironmentContainerData.Update { - private EnvironmentContainerDataInner innerObject; +public final class EnvironmentContainerImpl + implements EnvironmentContainer, EnvironmentContainer.Definition, EnvironmentContainer.Update { + private EnvironmentContainerInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +28,7 @@ public String type() { return this.innerModel().type(); } - public EnvironmentContainerDetails properties() { + public EnvironmentContainerProperties properties() { return this.innerModel().properties(); } @@ -40,7 +40,7 @@ public String resourceGroupName() { return resourceGroupName; } - public EnvironmentContainerDataInner innerModel() { + public EnvironmentContainerInner innerModel() { return this.innerObject; } @@ -54,13 +54,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String name; - public EnvironmentContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public EnvironmentContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public EnvironmentContainerData create() { + public EnvironmentContainer create() { this.innerObject = serviceManager .serviceClient() @@ -70,7 +70,7 @@ public EnvironmentContainerData create() { return this; } - public EnvironmentContainerData create(Context context) { + public EnvironmentContainer create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -80,18 +80,18 @@ public EnvironmentContainerData create(Context context) { return this; } - EnvironmentContainerDataImpl( + EnvironmentContainerImpl( String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new EnvironmentContainerDataInner(); + this.innerObject = new EnvironmentContainerInner(); this.serviceManager = serviceManager; this.name = name; } - public EnvironmentContainerDataImpl update() { + public EnvironmentContainerImpl update() { return this; } - public EnvironmentContainerData apply() { + public EnvironmentContainer apply() { this.innerObject = serviceManager .serviceClient() @@ -101,7 +101,7 @@ public EnvironmentContainerData apply() { return this; } - public EnvironmentContainerData apply(Context context) { + public EnvironmentContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -111,8 +111,8 @@ public EnvironmentContainerData apply(Context context) { return this; } - EnvironmentContainerDataImpl( - EnvironmentContainerDataInner innerObject, + EnvironmentContainerImpl( + EnvironmentContainerInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -121,7 +121,7 @@ public EnvironmentContainerData apply(Context context) { this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); } - public EnvironmentContainerData refresh() { + public EnvironmentContainer refresh() { this.innerObject = serviceManager .serviceClient() @@ -131,7 +131,7 @@ public EnvironmentContainerData refresh() { return this; } - public EnvironmentContainerData refresh(Context context) { + public EnvironmentContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -141,7 +141,7 @@ public EnvironmentContainerData refresh(Context context) { return this; } - public EnvironmentContainerDataImpl withProperties(EnvironmentContainerDetails properties) { + 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 index c2feb7dd5e19d..b6bab63de6407 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -100,7 +100,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -116,14 +116,14 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EnvironmentContainerDataInner body, + @BodyParam("application/json") EnvironmentContainerInner body, @HeaderParam("Accept") String accept, Context context); @@ -152,7 +152,7 @@ Mono> listNext( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { if (this.client.getEndpoint() == null) { return Mono @@ -188,7 +188,7 @@ private Mono> listSinglePageAsync( listViewType, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -215,7 +215,7 @@ private Mono> listSinglePageAsync( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -273,7 +273,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), @@ -291,7 +291,7 @@ private PagedFlux listAsync( * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; return new PagedFlux<>( @@ -313,7 +313,7 @@ private PagedFlux listAsync(String resourceGroupN * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), @@ -331,7 +331,7 @@ private PagedFlux listAsync( * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); @@ -351,7 +351,7 @@ public PagedIterable list(String resourceGroupNam * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); } @@ -520,7 +520,7 @@ public Response deleteWithResponse( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name) { if (this.client.getEndpoint() == null) { return Mono @@ -574,7 +574,7 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -624,7 +624,7 @@ private Mono> getWithResponseAsync( * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { return getWithResponseAsync(resourceGroupName, workspaceName, name) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -641,7 +641,7 @@ private Mono getAsync(String resourceGroupName, S * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerDataInner get(String resourceGroupName, String workspaceName, String name) { + public EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name) { return getAsync(resourceGroupName, workspaceName, name).block(); } @@ -658,7 +658,7 @@ public EnvironmentContainerDataInner get(String resourceGroupName, String worksp * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } @@ -677,8 +677,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -739,12 +739,8 @@ private Mono> createOrUpdateWithResponse * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - EnvironmentContainerDataInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -800,8 +796,8 @@ private Mono> createOrUpdateWithResponse * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerDataInner body) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -819,8 +815,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerDataInner body) { + public EnvironmentContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); } @@ -838,12 +834,8 @@ public EnvironmentContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - EnvironmentContainerDataInner body, - Context context) { + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } @@ -858,7 +850,7 @@ public Response createOrUpdateWithResponse( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -871,7 +863,7 @@ private Mono> listNextSinglePageAsy final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -895,8 +887,7 @@ private Mono> listNextSinglePageAsy * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index f562d3cb0a38c..1021b54275544 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerData; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainers; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -29,17 +29,16 @@ public EnvironmentContainersImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EnvironmentContainerDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new EnvironmentContainerDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -51,31 +50,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } - public EnvironmentContainerData get(String resourceGroupName, String workspaceName, String name) { - EnvironmentContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public EnvironmentContainer get(String resourceGroupName, String workspaceName, String name) { + EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { - return new EnvironmentContainerDataImpl(inner, this.manager()); + return new EnvironmentContainerImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentContainerDataImpl(inner.getValue(), this.manager())); + new EnvironmentContainerImpl(inner.getValue(), this.manager())); } else { return null; } } - public EnvironmentContainerData getById(String id) { + public EnvironmentContainer getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -101,7 +100,7 @@ public EnvironmentContainerData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -187,7 +186,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public EnvironmentContainerDataImpl define(String name) { - return new EnvironmentContainerDataImpl(name, this.manager()); + 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/EnvironmentVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java index 1636870e45e37..653ef01782d9e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java @@ -6,13 +6,13 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionData; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionDetails; +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 EnvironmentVersionDataImpl - implements EnvironmentVersionData, EnvironmentVersionData.Definition, EnvironmentVersionData.Update { - private EnvironmentVersionDataInner innerObject; +public final class EnvironmentVersionImpl + implements EnvironmentVersion, EnvironmentVersion.Definition, EnvironmentVersion.Update { + private EnvironmentVersionInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +28,7 @@ public String type() { return this.innerModel().type(); } - public EnvironmentVersionDetails properties() { + public EnvironmentVersionProperties properties() { return this.innerModel().properties(); } @@ -40,7 +40,7 @@ public String resourceGroupName() { return resourceGroupName; } - public EnvironmentVersionDataInner innerModel() { + public EnvironmentVersionInner innerModel() { return this.innerObject; } @@ -56,15 +56,14 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String version; - public EnvironmentVersionDataImpl withExistingEnvironment( - String resourceGroupName, String workspaceName, String name) { + public EnvironmentVersionImpl withExistingEnvironment(String resourceGroupName, String workspaceName, String name) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; this.name = name; return this; } - public EnvironmentVersionData create() { + public EnvironmentVersion create() { this.innerObject = serviceManager .serviceClient() @@ -75,7 +74,7 @@ public EnvironmentVersionData create() { return this; } - public EnvironmentVersionData create(Context context) { + public EnvironmentVersion create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -85,18 +84,18 @@ public EnvironmentVersionData create(Context context) { return this; } - EnvironmentVersionDataImpl( + EnvironmentVersionImpl( String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new EnvironmentVersionDataInner(); + this.innerObject = new EnvironmentVersionInner(); this.serviceManager = serviceManager; this.version = name; } - public EnvironmentVersionDataImpl update() { + public EnvironmentVersionImpl update() { return this; } - public EnvironmentVersionData apply() { + public EnvironmentVersion apply() { this.innerObject = serviceManager .serviceClient() @@ -107,7 +106,7 @@ public EnvironmentVersionData apply() { return this; } - public EnvironmentVersionData apply(Context context) { + public EnvironmentVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -117,8 +116,8 @@ public EnvironmentVersionData apply(Context context) { return this; } - EnvironmentVersionDataImpl( - EnvironmentVersionDataInner innerObject, + EnvironmentVersionImpl( + EnvironmentVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -128,7 +127,7 @@ public EnvironmentVersionData apply(Context context) { this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public EnvironmentVersionData refresh() { + public EnvironmentVersion refresh() { this.innerObject = serviceManager .serviceClient() @@ -138,7 +137,7 @@ public EnvironmentVersionData refresh() { return this; } - public EnvironmentVersionData refresh(Context context) { + public EnvironmentVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -148,7 +147,7 @@ public EnvironmentVersionData refresh(Context context) { return this; } - public EnvironmentVersionDataImpl withProperties(EnvironmentVersionDetails properties) { + 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 index 224d59b216f26..9da1b0edb5f7a 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -105,7 +105,7 @@ Mono> delete( + "/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -123,7 +123,7 @@ Mono> get( + "/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -131,7 +131,7 @@ Mono> createOrUpdate( @PathParam("name") String name, @PathParam("version") String version, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EnvironmentVersionDataInner body, + @BodyParam("application/json") EnvironmentVersionInner body, @HeaderParam("Accept") String accept, Context context); @@ -163,7 +163,7 @@ Mono> listNext( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -211,7 +211,7 @@ private Mono> listSinglePageAsync( listViewType, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -241,7 +241,7 @@ private Mono> listSinglePageAsync( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -315,7 +315,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -340,8 +340,7 @@ private PagedFlux listAsync( * @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) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -368,7 +367,7 @@ private PagedFlux listAsync( * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -395,8 +394,7 @@ private PagedFlux listAsync( * @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) { + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -421,7 +419,7 @@ public PagedIterable list( * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -614,7 +612,7 @@ public Response deleteWithResponse( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version) { if (this.client.getEndpoint() == null) { return Mono @@ -673,7 +671,7 @@ private Mono> getWithResponseAsync( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -728,7 +726,7 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono getAsync( String resourceGroupName, String workspaceName, String name, String version) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -747,8 +745,7 @@ private Mono getAsync( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionDataInner get( - String resourceGroupName, String workspaceName, String name, String version) { + public EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { return getAsync(resourceGroupName, workspaceName, name, version).block(); } @@ -766,7 +763,7 @@ public EnvironmentVersionDataInner get( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } @@ -786,8 +783,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -853,12 +850,12 @@ private Mono> createOrUpdateWithResponseAs * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, - EnvironmentVersionDataInner body, + EnvironmentVersionInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -920,8 +917,8 @@ private Mono> createOrUpdateWithResponseAs * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionDataInner body) { + 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())); } @@ -940,8 +937,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionDataInner body) { + public EnvironmentVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); } @@ -960,12 +957,12 @@ public EnvironmentVersionDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - EnvironmentVersionDataInner body, + EnvironmentVersionInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } @@ -981,7 +978,7 @@ public Response createOrUpdateWithResponse( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -994,7 +991,7 @@ private Mono> listNextSinglePageAsync final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1018,7 +1015,7 @@ private Mono> listNextSinglePageAsync * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index a7a4c36384cb5..82363a88cc2d4 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionData; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersions; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -29,13 +29,13 @@ public EnvironmentVersionsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new EnvironmentVersionDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -44,11 +44,11 @@ public PagedIterable list( String skip, ListViewType listViewType, Context context) { - PagedIterable inner = + PagedIterable inner = this .serviceClient() .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new EnvironmentVersionDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name, String version) { @@ -60,31 +60,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } - public EnvironmentVersionData get(String resourceGroupName, String workspaceName, String name, String version) { - EnvironmentVersionDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + 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 EnvironmentVersionDataImpl(inner, this.manager()); + return new EnvironmentVersionImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentVersionDataImpl(inner.getValue(), this.manager())); + new EnvironmentVersionImpl(inner.getValue(), this.manager())); } else { return null; } } - public EnvironmentVersionData getById(String id) { + public EnvironmentVersion getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -117,7 +117,7 @@ public EnvironmentVersionData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -224,7 +224,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public EnvironmentVersionDataImpl define(String name) { - return new EnvironmentVersionDataImpl(name, this.manager()); + 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/ExportSummaryImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExportSummaryImpl.java new file mode 100644 index 0000000000000..0fb6b3f2e8aa3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExportSummaryImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All 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.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.models.ExportSummary; +import java.time.OffsetDateTime; + +public final class ExportSummaryImpl implements ExportSummary { + private ExportSummaryInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + ExportSummaryImpl( + ExportSummaryInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public OffsetDateTime endDateTime() { + return this.innerModel().endDateTime(); + } + + public Long exportedRowCount() { + return this.innerModel().exportedRowCount(); + } + + public String labelingJobId() { + return this.innerModel().labelingJobId(); + } + + public OffsetDateTime startDateTime() { + return this.innerModel().startDateTime(); + } + + public ExportSummaryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java index 640159cd03446..1b26fd5f42d47 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java @@ -4,15 +4,14 @@ package com.azure.resourcemanager.machinelearning.implementation; -import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseData; -import com.azure.resourcemanager.machinelearning.models.JobBaseDetails; +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 JobBaseDataImpl implements JobBaseData, JobBaseData.Definition, JobBaseData.Update { - private JobBaseDataInner innerObject; +public final class JobBaseImpl implements JobBase, JobBase.Definition, JobBase.Update { + private JobBaseInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +27,7 @@ public String type() { return this.innerModel().type(); } - public JobBaseDetails properties() { + public JobBaseProperties properties() { return this.innerModel().properties(); } @@ -40,7 +39,7 @@ public String resourceGroupName() { return resourceGroupName; } - public JobBaseDataInner innerModel() { + public JobBaseInner innerModel() { return this.innerObject; } @@ -54,13 +53,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String id; - public JobBaseDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public JobBaseImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public JobBaseData create() { + public JobBase create() { this.innerObject = serviceManager .serviceClient() @@ -70,7 +69,7 @@ public JobBaseData create() { return this; } - public JobBaseData create(Context context) { + public JobBase create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -80,17 +79,17 @@ public JobBaseData create(Context context) { return this; } - JobBaseDataImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new JobBaseDataInner(); + JobBaseImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new JobBaseInner(); this.serviceManager = serviceManager; this.id = name; } - public JobBaseDataImpl update() { + public JobBaseImpl update() { return this; } - public JobBaseData apply() { + public JobBase apply() { this.innerObject = serviceManager .serviceClient() @@ -100,7 +99,7 @@ public JobBaseData apply() { return this; } - public JobBaseData apply(Context context) { + public JobBase apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -110,8 +109,8 @@ public JobBaseData apply(Context context) { return this; } - JobBaseDataImpl( - JobBaseDataInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + JobBaseImpl( + JobBaseInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -119,7 +118,7 @@ public JobBaseData apply(Context context) { this.id = Utils.getValueFromIdByName(innerObject.id(), "jobs"); } - public JobBaseData refresh() { + public JobBase refresh() { this.innerObject = serviceManager .serviceClient() @@ -129,7 +128,7 @@ public JobBaseData refresh() { return this; } - public JobBaseData refresh(Context context) { + public JobBase refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -143,11 +142,11 @@ public void cancel() { serviceManager.jobs().cancel(resourceGroupName, workspaceName, id); } - public Response cancelWithResponse(Context context) { - return serviceManager.jobs().cancelWithResponse(resourceGroupName, workspaceName, id, context); + public void cancel(Context context) { + serviceManager.jobs().cancel(resourceGroupName, workspaceName, id, context); } - public JobBaseDataImpl withProperties(JobBaseDetails properties) { + 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 index f2c11073c9e45..3babf5d326a87 100644 --- 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 @@ -33,7 +33,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.JobsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; @@ -108,7 +108,7 @@ Mono>> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -124,14 +124,14 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobBaseDataInner body, + @BodyParam("application/json") JobBaseInner body, @HeaderParam("Accept") String accept, Context context); @@ -139,9 +139,9 @@ Mono> createOrUpdate( @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") - @ExpectedResponses({200}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel( + Mono>> cancel( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -180,7 +180,7 @@ Mono> listNext( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, @@ -227,7 +227,7 @@ private Mono> listSinglePageAsync( scheduleId, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -258,7 +258,7 @@ private Mono> listSinglePageAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, @@ -332,7 +332,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, @@ -359,7 +359,7 @@ private PagedFlux listAsync( * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final String jobType = null; final String tag = null; @@ -391,7 +391,7 @@ private PagedFlux listAsync(String resourceGroupName, String w * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, @@ -419,7 +419,7 @@ private PagedFlux listAsync( * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; final String jobType = null; final String tag = null; @@ -448,7 +448,7 @@ public PagedIterable list(String resourceGroupName, String wor * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -724,7 +724,7 @@ public void delete(String resourceGroupName, String workspaceName, String id, Co * @return a Job by name/id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String id) { if (this.client.getEndpoint() == null) { return Mono @@ -778,7 +778,7 @@ private Mono> getWithResponseAsync( * @return a Job by name/id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String id, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -828,7 +828,7 @@ private Mono> getWithResponseAsync( * @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) { + private Mono getAsync(String resourceGroupName, String workspaceName, String id) { return getWithResponseAsync(resourceGroupName, workspaceName, id) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -845,7 +845,7 @@ private Mono getAsync(String resourceGroupName, String workspa * @return a Job by name/id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseDataInner get(String resourceGroupName, String workspaceName, String id) { + public JobBaseInner get(String resourceGroupName, String workspaceName, String id) { return getAsync(resourceGroupName, workspaceName, id).block(); } @@ -862,7 +862,7 @@ public JobBaseDataInner get(String resourceGroupName, String workspaceName, Stri * @return a Job by name/id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String id, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); } @@ -881,8 +881,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String id, JobBaseInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -943,8 +943,8 @@ private Mono> createOrUpdateWithResponseAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1000,8 +1000,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String id, JobBaseInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1019,8 +1019,7 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body) { + public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, id, body).block(); } @@ -1038,13 +1037,13 @@ public JobBaseDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body, Context context) { + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); } /** - * Cancels a Job. + * 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. @@ -1055,7 +1054,8 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync(String resourceGroupName, String workspaceName, String id) { + private Mono>> cancelWithResponseAsync( + String resourceGroupName, String workspaceName, String id) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1096,7 +1096,7 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S } /** - * Cancels a Job. + * 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. @@ -1108,7 +1108,7 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync( + private Mono>> cancelWithResponseAsync( String resourceGroupName, String workspaceName, String id, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1147,7 +1147,84 @@ private Mono> cancelWithResponseAsync( } /** - * Cancels a Job. + * 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 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 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. @@ -1159,11 +1236,32 @@ private Mono> cancelWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAsync(String resourceGroupName, String workspaceName, String id) { - return cancelWithResponseAsync(resourceGroupName, workspaceName, id).flatMap(ignored -> Mono.empty()); + return beginCancelAsync(resourceGroupName, workspaceName, id) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Cancels a Job. + * 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. @@ -1178,7 +1276,7 @@ public void cancel(String resourceGroupName, String workspaceName, String id) { } /** - * Cancels a Job. + * 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. @@ -1187,12 +1285,10 @@ public void cancel(String resourceGroupName, String workspaceName, String id) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { - return cancelWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); + public void cancel(String resourceGroupName, String workspaceName, String id, Context context) { + cancelAsync(resourceGroupName, workspaceName, id, context).block(); } /** @@ -1206,7 +1302,7 @@ public Response cancelWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1219,7 +1315,7 @@ private Mono> listNextSinglePageAsync(String nex final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1243,7 +1339,7 @@ private Mono> listNextSinglePageAsync(String nex * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index bbd2a142394e7..138a67bb6a0dd 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.JobsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseData; +import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; +import com.azure.resourcemanager.machinelearning.models.JobBase; import com.azure.resourcemanager.machinelearning.models.Jobs; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -28,12 +28,12 @@ public JobsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new JobBaseDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -43,12 +43,12 @@ public PagedIterable list( Boolean scheduled, String scheduleId, Context context) { - PagedIterable inner = + PagedIterable inner = this .serviceClient() .list( resourceGroupName, workspaceName, skip, jobType, tag, listViewType, scheduled, scheduleId, context); - return Utils.mapPage(inner, inner1 -> new JobBaseDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String id) { @@ -59,25 +59,25 @@ public void delete(String resourceGroupName, String workspaceName, String id, Co this.serviceClient().delete(resourceGroupName, workspaceName, id, context); } - public JobBaseData get(String resourceGroupName, String workspaceName, String id) { - JobBaseDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); + public JobBase get(String resourceGroupName, String workspaceName, String id) { + JobBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); if (inner != null) { - return new JobBaseDataImpl(inner, this.manager()); + return new JobBaseImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String id, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, id, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobBaseDataImpl(inner.getValue(), this.manager())); + new JobBaseImpl(inner.getValue(), this.manager())); } else { return null; } @@ -87,12 +87,11 @@ public void cancel(String resourceGroupName, String workspaceName, String id) { this.serviceClient().cancel(resourceGroupName, workspaceName, id); } - public Response cancelWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { - return this.serviceClient().cancelWithResponse(resourceGroupName, workspaceName, id, context); + public void cancel(String resourceGroupName, String workspaceName, String id, Context context) { + this.serviceClient().cancel(resourceGroupName, workspaceName, id, context); } - public JobBaseData getById(String id) { + public JobBase getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -118,7 +117,7 @@ public JobBaseData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, varId, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -204,7 +203,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public JobBaseDataImpl define(String name) { - return new JobBaseDataImpl(name, this.manager()); + 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/LabelingJobImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobImpl.java new file mode 100644 index 0000000000000..4c611689c17af --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobImpl.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights 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.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.azure.resourcemanager.machinelearning.models.ExportSummary; +import com.azure.resourcemanager.machinelearning.models.LabelingJob; +import com.azure.resourcemanager.machinelearning.models.LabelingJobProperties; + +public final class LabelingJobImpl implements LabelingJob, LabelingJob.Definition, LabelingJob.Update { + private LabelingJobInner 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 LabelingJobProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LabelingJobInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String id; + + public LabelingJobImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public LabelingJob create() { + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .createOrUpdate(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE); + return this; + } + + public LabelingJob create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .createOrUpdate(resourceGroupName, workspaceName, id, this.innerModel(), context); + return this; + } + + LabelingJobImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new LabelingJobInner(); + this.serviceManager = serviceManager; + this.id = name; + } + + public LabelingJobImpl update() { + return this; + } + + public LabelingJob apply() { + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .createOrUpdate(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE); + return this; + } + + public LabelingJob apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .createOrUpdate(resourceGroupName, workspaceName, id, this.innerModel(), context); + return this; + } + + LabelingJobImpl( + LabelingJobInner 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(), "labelingJobs"); + } + + public LabelingJob refresh() { + Boolean localIncludeJobInstructions = null; + Boolean localIncludeLabelCategories = null; + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .getWithResponse( + resourceGroupName, + workspaceName, + id, + localIncludeJobInstructions, + localIncludeLabelCategories, + Context.NONE) + .getValue(); + return this; + } + + public LabelingJob refresh(Context context) { + Boolean localIncludeJobInstructions = null; + Boolean localIncludeLabelCategories = null; + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .getWithResponse( + resourceGroupName, + workspaceName, + id, + localIncludeJobInstructions, + localIncludeLabelCategories, + context) + .getValue(); + return this; + } + + public ExportSummary exportLabels(ExportSummaryInner body) { + return serviceManager.labelingJobs().exportLabels(resourceGroupName, workspaceName, id, body); + } + + public ExportSummary exportLabels(ExportSummaryInner body, Context context) { + return serviceManager.labelingJobs().exportLabels(resourceGroupName, workspaceName, id, body, context); + } + + public void pause() { + serviceManager.labelingJobs().pause(resourceGroupName, workspaceName, id); + } + + public Response pauseWithResponse(Context context) { + return serviceManager.labelingJobs().pauseWithResponse(resourceGroupName, workspaceName, id, context); + } + + public void resume() { + serviceManager.labelingJobs().resume(resourceGroupName, workspaceName, id); + } + + public void resume(Context context) { + serviceManager.labelingJobs().resume(resourceGroupName, workspaceName, id, context); + } + + public LabelingJobImpl withProperties(LabelingJobProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsClientImpl.java new file mode 100644 index 0000000000000..a15dfdba3bd8b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsClientImpl.java @@ -0,0 +1,1823 @@ +// Copyright (c) Microsoft Corporation. All rights 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.LabelingJobsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.azure.resourcemanager.machinelearning.models.LabelingJobResourceArmPaginatedResult; +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 LabelingJobsClient. */ +public final class LabelingJobsClientImpl implements LabelingJobsClient { + /** The proxy service used to perform REST calls. */ + private final LabelingJobsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of LabelingJobsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LabelingJobsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = + RestProxy.create(LabelingJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesLabelingJobs to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface LabelingJobsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs") + @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, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}") + @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("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}/labelingJobs/{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, + @QueryParam("includeJobInstructions") Boolean includeJobInstructions, + @QueryParam("includeLabelCategories") Boolean includeLabelCategories, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{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") LabelingJobInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/exportLabels") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> exportLabels( + @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") ExportSummaryInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/pause") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> pause( + @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"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/resume") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resume( + @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 labeling 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 count Number of labeling jobs to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob 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) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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, + 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 labeling 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 count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob 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, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists labeling 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 count Number of labeling jobs to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skip, Integer count) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists labeling 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 LabelingJob 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; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists labeling 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 count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists labeling 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 LabelingJob 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; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count)); + } + + /** + * Lists labeling 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 count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, context)); + } + + /** + * Delete a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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())); + } + + /** + * Delete a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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); + } + + /** + * Delete a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteWithResponseAsync(resourceGroupName, workspaceName, id).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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(); + } + + /** + * Delete a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 id, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); + } + + /** + * Gets a labeling 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 LabelingJob. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling 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, + Boolean includeJobInstructions, + Boolean includeLabelCategories) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter 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(), + includeJobInstructions, + includeLabelCategories, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a labeling 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 LabelingJob. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling 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, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter 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(), + includeJobInstructions, + includeLabelCategories, + accept, + context); + } + + /** + * Gets a labeling 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 LabelingJob. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, + String workspaceName, + String id, + Boolean includeJobInstructions, + Boolean includeLabelCategories) { + return getWithResponseAsync( + resourceGroupName, workspaceName, id, includeJobInstructions, includeLabelCategories) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String id) { + final Boolean includeJobInstructions = null; + final Boolean includeLabelCategories = null; + return getWithResponseAsync( + resourceGroupName, workspaceName, id, includeJobInstructions, includeLabelCategories) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobInner get(String resourceGroupName, String workspaceName, String id) { + final Boolean includeJobInstructions = null; + final Boolean includeLabelCategories = null; + return getAsync(resourceGroupName, workspaceName, id, includeJobInstructions, includeLabelCategories).block(); + } + + /** + * Gets a labeling 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 LabelingJob. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String id, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context) { + return getWithResponseAsync( + resourceGroupName, workspaceName, id, includeJobInstructions, includeLabelCategories, context) + .block(); + } + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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, LabelingJobInner 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 or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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, LabelingJobInner 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 or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LabelingJobInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + LabelingJobInner.class, + LabelingJobInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LabelingJobInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), LabelingJobInner.class, LabelingJobInner.class, context); + } + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LabelingJobInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, id, body).getSyncPoller(); + } + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LabelingJobInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, id, body, context).getSyncPoller(); + } + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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, LabelingJobInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, id, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, id, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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 LabelingJobInner createOrUpdate( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, id, body).block(); + } + + /** + * Creates or updates a labeling 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 LabelingJob. + * @param body LabelingJob 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobInner createOrUpdate( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, id, body, context).block(); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> exportLabelsWithResponseAsync( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner 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 + .exportLabels( + 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())); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> exportLabelsWithResponseAsync( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner 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 + .exportLabels( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + id, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ExportSummaryInner> beginExportLabelsAsync( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body) { + Mono>> mono = + exportLabelsWithResponseAsync(resourceGroupName, workspaceName, id, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ExportSummaryInner.class, + ExportSummaryInner.class, + this.client.getContext()); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ExportSummaryInner> beginExportLabelsAsync( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + exportLabelsWithResponseAsync(resourceGroupName, workspaceName, id, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ExportSummaryInner.class, ExportSummaryInner.class, context); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, ExportSummaryInner> beginExportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body) { + return beginExportLabelsAsync(resourceGroupName, workspaceName, id, body).getSyncPoller(); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, ExportSummaryInner> beginExportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context) { + return beginExportLabelsAsync(resourceGroupName, workspaceName, id, body, context).getSyncPoller(); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 exportLabelsAsync( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body) { + return beginExportLabelsAsync(resourceGroupName, workspaceName, id, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 exportLabelsAsync( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context) { + return beginExportLabelsAsync(resourceGroupName, workspaceName, id, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ExportSummaryInner exportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body) { + return exportLabelsAsync(resourceGroupName, workspaceName, id, body).block(); + } + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ExportSummaryInner exportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context) { + return exportLabelsAsync(resourceGroupName, workspaceName, id, body, context).block(); + } + + /** + * Pause a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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> pauseWithResponseAsync(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 + .pause( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + id, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Pause a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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> pauseWithResponseAsync( + 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 + .pause( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + id, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Pause a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 pauseAsync(String resourceGroupName, String workspaceName, String id) { + return pauseWithResponseAsync(resourceGroupName, workspaceName, id).flatMap(ignored -> Mono.empty()); + } + + /** + * Pause a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 pause(String resourceGroupName, String workspaceName, String id) { + pauseAsync(resourceGroupName, workspaceName, id).block(); + } + + /** + * Pause a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 pauseWithResponse( + String resourceGroupName, String workspaceName, String id, Context context) { + return pauseWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); + } + + /** + * Resume a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> resumeWithResponseAsync( + 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 + .resume( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + id, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resume a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> resumeWithResponseAsync( + 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 + .resume( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + id, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Resume a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginResumeAsync( + String resourceGroupName, String workspaceName, String id) { + Mono>> mono = resumeWithResponseAsync(resourceGroupName, workspaceName, id); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Resume a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginResumeAsync( + String resourceGroupName, String workspaceName, String id, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = resumeWithResponseAsync(resourceGroupName, workspaceName, id, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Resume a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginResume(String resourceGroupName, String workspaceName, String id) { + return beginResumeAsync(resourceGroupName, workspaceName, id).getSyncPoller(); + } + + /** + * Resume a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginResume( + String resourceGroupName, String workspaceName, String id, Context context) { + return beginResumeAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); + } + + /** + * Resume a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 resumeAsync(String resourceGroupName, String workspaceName, String id) { + return beginResumeAsync(resourceGroupName, workspaceName, id) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resume a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 resumeAsync(String resourceGroupName, String workspaceName, String id, Context context) { + return beginResumeAsync(resourceGroupName, workspaceName, id, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resume a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 resume(String resourceGroupName, String workspaceName, String id) { + resumeAsync(resourceGroupName, workspaceName, id).block(); + } + + /** + * Resume a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 resume(String resourceGroupName, String workspaceName, String id, Context context) { + resumeAsync(resourceGroupName, workspaceName, id, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob 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/LabelingJobsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsImpl.java new file mode 100644 index 0000000000000..55ad56152b7c5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsImpl.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights 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.LabelingJobsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.azure.resourcemanager.machinelearning.models.ExportSummary; +import com.azure.resourcemanager.machinelearning.models.LabelingJob; +import com.azure.resourcemanager.machinelearning.models.LabelingJobs; + +public final class LabelingJobsImpl implements LabelingJobs { + private static final ClientLogger LOGGER = new ClientLogger(LabelingJobsImpl.class); + + private final LabelingJobsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public LabelingJobsImpl( + LabelingJobsClient 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 LabelingJobImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skip, count, context); + return Utils.mapPage(inner, inner1 -> new LabelingJobImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String id) { + this.serviceClient().delete(resourceGroupName, workspaceName, id); + } + + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String id, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, id, context); + } + + public LabelingJob get(String resourceGroupName, String workspaceName, String id) { + LabelingJobInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); + if (inner != null) { + return new LabelingJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String id, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + resourceGroupName, workspaceName, id, includeJobInstructions, includeLabelCategories, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new LabelingJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ExportSummary exportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body) { + ExportSummaryInner inner = this.serviceClient().exportLabels(resourceGroupName, workspaceName, id, body); + if (inner != null) { + return new ExportSummaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExportSummary exportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context) { + ExportSummaryInner inner = + this.serviceClient().exportLabels(resourceGroupName, workspaceName, id, body, context); + if (inner != null) { + return new ExportSummaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public void pause(String resourceGroupName, String workspaceName, String id) { + this.serviceClient().pause(resourceGroupName, workspaceName, id); + } + + public Response pauseWithResponse( + String resourceGroupName, String workspaceName, String id, Context context) { + return this.serviceClient().pauseWithResponse(resourceGroupName, workspaceName, id, context); + } + + public void resume(String resourceGroupName, String workspaceName, String id) { + this.serviceClient().resume(resourceGroupName, workspaceName, id); + } + + public void resume(String resourceGroupName, String workspaceName, String id, Context context) { + this.serviceClient().resume(resourceGroupName, workspaceName, id, context); + } + + public LabelingJob 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, "labelingJobs"); + if (varId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + Boolean localIncludeJobInstructions = null; + Boolean localIncludeLabelCategories = null; + return this + .getWithResponse( + resourceGroupName, + workspaceName, + varId, + localIncludeJobInstructions, + localIncludeLabelCategories, + Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse( + String id, Boolean includeJobInstructions, Boolean includeLabelCategories, 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, "labelingJobs"); + if (varId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + return this + .getWithResponse( + resourceGroupName, workspaceName, varId, includeJobInstructions, includeLabelCategories, 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, "labelingJobs"); + if (varId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, varId, 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 varId = Utils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, varId, context); + } + + private LabelingJobsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public LabelingJobImpl define(String name) { + return new LabelingJobImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java index 48ebb00f4f0d3..dc2e9e476a07f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java @@ -6,13 +6,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerData; -import com.azure.resourcemanager.machinelearning.models.ModelContainerDetails; +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 ModelContainerDataImpl - implements ModelContainerData, ModelContainerData.Definition, ModelContainerData.Update { - private ModelContainerDataInner innerObject; +public final class ModelContainerImpl implements ModelContainer, ModelContainer.Definition, ModelContainer.Update { + private ModelContainerInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +27,7 @@ public String type() { return this.innerModel().type(); } - public ModelContainerDetails properties() { + public ModelContainerProperties properties() { return this.innerModel().properties(); } @@ -40,7 +39,7 @@ public String resourceGroupName() { return resourceGroupName; } - public ModelContainerDataInner innerModel() { + public ModelContainerInner innerModel() { return this.innerObject; } @@ -54,13 +53,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String name; - public ModelContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public ModelContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public ModelContainerData create() { + public ModelContainer create() { this.innerObject = serviceManager .serviceClient() @@ -70,7 +69,7 @@ public ModelContainerData create() { return this; } - public ModelContainerData create(Context context) { + public ModelContainer create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -80,18 +79,17 @@ public ModelContainerData create(Context context) { return this; } - ModelContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ModelContainerDataInner(); + ModelContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new ModelContainerInner(); this.serviceManager = serviceManager; this.name = name; } - public ModelContainerDataImpl update() { + public ModelContainerImpl update() { return this; } - public ModelContainerData apply() { + public ModelContainer apply() { this.innerObject = serviceManager .serviceClient() @@ -101,7 +99,7 @@ public ModelContainerData apply() { return this; } - public ModelContainerData apply(Context context) { + public ModelContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -111,8 +109,8 @@ public ModelContainerData apply(Context context) { return this; } - ModelContainerDataImpl( - ModelContainerDataInner innerObject, + ModelContainerImpl( + ModelContainerInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -121,7 +119,7 @@ public ModelContainerData apply(Context context) { this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); } - public ModelContainerData refresh() { + public ModelContainer refresh() { this.innerObject = serviceManager .serviceClient() @@ -131,7 +129,7 @@ public ModelContainerData refresh() { return this; } - public ModelContainerData refresh(Context context) { + public ModelContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -141,7 +139,7 @@ public ModelContainerData refresh(Context context) { return this; } - public ModelContainerDataImpl withProperties(ModelContainerDetails properties) { + 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 index 66d7502187975..443b6a200ca14 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; import reactor.core.publisher.Mono; @@ -100,7 +100,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -116,14 +116,14 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ModelContainerDataInner body, + @BodyParam("application/json") ModelContainerInner body, @HeaderParam("Accept") String accept, Context context); @@ -153,7 +153,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, Integer count, ListViewType listViewType) { if (this.client.getEndpoint() == null) { return Mono @@ -190,7 +190,7 @@ private Mono> listSinglePageAsync( listViewType, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -218,7 +218,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, @@ -283,7 +283,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, Integer count, ListViewType listViewType) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), @@ -301,7 +301,7 @@ private PagedFlux listAsync( * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final Integer count = null; final ListViewType listViewType = null; @@ -325,7 +325,7 @@ private PagedFlux listAsync(String resourceGroupName, S * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, @@ -348,7 +348,7 @@ private PagedFlux listAsync( * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; final Integer count = null; final ListViewType listViewType = null; @@ -370,7 +370,7 @@ public PagedIterable list(String resourceGroupName, Str * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -544,7 +544,7 @@ public Response deleteWithResponse( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name) { if (this.client.getEndpoint() == null) { return Mono @@ -598,7 +598,7 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -648,7 +648,7 @@ private Mono> getWithResponseAsync( * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { return getWithResponseAsync(resourceGroupName, workspaceName, name) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -665,7 +665,7 @@ private Mono getAsync(String resourceGroupName, String * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerDataInner get(String resourceGroupName, String workspaceName, String name) { + public ModelContainerInner get(String resourceGroupName, String workspaceName, String name) { return getAsync(resourceGroupName, workspaceName, name).block(); } @@ -682,7 +682,7 @@ public ModelContainerDataInner get(String resourceGroupName, String workspaceNam * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } @@ -701,8 +701,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -763,8 +763,8 @@ private Mono> createOrUpdateWithResponseAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -820,8 +820,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -839,8 +839,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body) { + public ModelContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); } @@ -858,8 +858,8 @@ public ModelContainerDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body, Context context) { + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } @@ -874,7 +874,7 @@ public Response createOrUpdateWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -887,7 +887,7 @@ private Mono> listNextSinglePageAsync(Str final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -911,7 +911,7 @@ private Mono> listNextSinglePageAsync(Str * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index 2a7ed48e4af3c..b3202f8386e74 100644 --- 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 @@ -10,9 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainerData; +import com.azure.resourcemanager.machinelearning.models.ModelContainer; import com.azure.resourcemanager.machinelearning.models.ModelContainers; public final class ModelContainersImpl implements ModelContainers { @@ -29,21 +29,21 @@ public ModelContainersImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ModelContainerDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, Integer count, ListViewType listViewType, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, skip, count, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ModelContainerDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -55,31 +55,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } - public ModelContainerData get(String resourceGroupName, String workspaceName, String name) { - ModelContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public ModelContainer get(String resourceGroupName, String workspaceName, String name) { + ModelContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { - return new ModelContainerDataImpl(inner, this.manager()); + return new ModelContainerImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelContainerDataImpl(inner.getValue(), this.manager())); + new ModelContainerImpl(inner.getValue(), this.manager())); } else { return null; } } - public ModelContainerData getById(String id) { + public ModelContainer getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -105,7 +105,7 @@ public ModelContainerData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -191,7 +191,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public ModelContainerDataImpl define(String name) { - return new ModelContainerDataImpl(name, this.manager()); + 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/ModelVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java index 4fe87793e74e4..8d4bf21616863 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java @@ -6,13 +6,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ModelVersionData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionDetails; +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 ModelVersionDataImpl - implements ModelVersionData, ModelVersionData.Definition, ModelVersionData.Update { - private ModelVersionDataInner innerObject; +public final class ModelVersionImpl implements ModelVersion, ModelVersion.Definition, ModelVersion.Update { + private ModelVersionInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +27,7 @@ public String type() { return this.innerModel().type(); } - public ModelVersionDetails properties() { + public ModelVersionProperties properties() { return this.innerModel().properties(); } @@ -40,7 +39,7 @@ public String resourceGroupName() { return resourceGroupName; } - public ModelVersionDataInner innerModel() { + public ModelVersionInner innerModel() { return this.innerObject; } @@ -56,14 +55,14 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String version; - public ModelVersionDataImpl withExistingModel(String resourceGroupName, String workspaceName, String name) { + public ModelVersionImpl withExistingModel(String resourceGroupName, String workspaceName, String name) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; this.name = name; return this; } - public ModelVersionData create() { + public ModelVersion create() { this.innerObject = serviceManager .serviceClient() @@ -74,7 +73,7 @@ public ModelVersionData create() { return this; } - public ModelVersionData create(Context context) { + public ModelVersion create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -84,17 +83,17 @@ public ModelVersionData create(Context context) { return this; } - ModelVersionDataImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ModelVersionDataInner(); + ModelVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new ModelVersionInner(); this.serviceManager = serviceManager; this.version = name; } - public ModelVersionDataImpl update() { + public ModelVersionImpl update() { return this; } - public ModelVersionData apply() { + public ModelVersion apply() { this.innerObject = serviceManager .serviceClient() @@ -105,7 +104,7 @@ public ModelVersionData apply() { return this; } - public ModelVersionData apply(Context context) { + public ModelVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -115,8 +114,8 @@ public ModelVersionData apply(Context context) { return this; } - ModelVersionDataImpl( - ModelVersionDataInner innerObject, + ModelVersionImpl( + ModelVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -126,7 +125,7 @@ public ModelVersionData apply(Context context) { this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public ModelVersionData refresh() { + public ModelVersion refresh() { this.innerObject = serviceManager .serviceClient() @@ -136,7 +135,7 @@ public ModelVersionData refresh() { return this; } - public ModelVersionData refresh(Context context) { + public ModelVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -146,7 +145,7 @@ public ModelVersionData refresh(Context context) { return this; } - public ModelVersionDataImpl withProperties(ModelVersionDetails properties) { + 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 index c22a87b4e8455..10d871d4927ad 100644 --- 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 @@ -29,7 +29,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; import reactor.core.publisher.Mono; @@ -109,7 +109,7 @@ Mono> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -126,7 +126,7 @@ Mono> get( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -134,7 +134,7 @@ Mono> createOrUpdate( @PathParam("name") String name, @PathParam("version") String version, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ModelVersionDataInner body, + @BodyParam("application/json") ModelVersionInner body, @HeaderParam("Accept") String accept, Context context); @@ -172,7 +172,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -232,7 +232,7 @@ private Mono> listSinglePageAsync( listViewType, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -268,7 +268,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -360,7 +360,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -405,7 +405,7 @@ private PagedFlux listAsync( * @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) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { final String skip = null; final String orderBy = null; final Integer top = null; @@ -458,7 +458,7 @@ private PagedFlux listAsync(String resourceGroupName, Str * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -505,7 +505,7 @@ private PagedFlux listAsync( * @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) { + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { final String skip = null; final String orderBy = null; final Integer top = null; @@ -556,7 +556,7 @@ public PagedIterable list(String resourceGroupName, Strin * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -769,7 +769,7 @@ public Response deleteWithResponse( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version) { if (this.client.getEndpoint() == null) { return Mono @@ -828,7 +828,7 @@ private Mono> getWithResponseAsync( * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -883,7 +883,7 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono getAsync( String resourceGroupName, String workspaceName, String name, String version) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -902,7 +902,7 @@ private Mono getAsync( * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { + public ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { return getAsync(resourceGroupName, workspaceName, name, version).block(); } @@ -920,7 +920,7 @@ public ModelVersionDataInner get(String resourceGroupName, String workspaceName, * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } @@ -940,8 +940,8 @@ public Response getWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionDataInner body) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1007,12 +1007,12 @@ private Mono> createOrUpdateWithResponseAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, - ModelVersionDataInner body, + ModelVersionInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1074,8 +1074,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionDataInner body) { + 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())); } @@ -1094,8 +1094,8 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionDataInner body) { + public ModelVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); } @@ -1114,12 +1114,12 @@ public ModelVersionDataInner createOrUpdate( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String name, String version, - ModelVersionDataInner body, + ModelVersionInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } @@ -1135,7 +1135,7 @@ public Response createOrUpdateWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1148,7 +1148,7 @@ private Mono> listNextSinglePageAsync(Strin final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1172,7 +1172,7 @@ private Mono> listNextSinglePageAsync(Strin * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index 5b030dde0a886..b7b7b453b3892 100644 --- 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 @@ -10,9 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionData; +import com.azure.resourcemanager.machinelearning.models.ModelVersion; import com.azure.resourcemanager.machinelearning.models.ModelVersions; public final class ModelVersionsImpl implements ModelVersions { @@ -29,12 +29,12 @@ public ModelVersionsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new ModelVersionDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -49,7 +49,7 @@ public PagedIterable list( String feed, ListViewType listViewType, Context context) { - PagedIterable inner = + PagedIterable inner = this .serviceClient() .list( @@ -67,7 +67,7 @@ public PagedIterable list( feed, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ModelVersionDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name, String version) { @@ -79,31 +79,31 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } - public ModelVersionData get(String resourceGroupName, String workspaceName, String name, String version) { - ModelVersionDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + 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 ModelVersionDataImpl(inner, this.manager()); + return new ModelVersionImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelVersionDataImpl(inner.getValue(), this.manager())); + new ModelVersionImpl(inner.getValue(), this.manager())); } else { return null; } } - public ModelVersionData getById(String id) { + public ModelVersion getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -136,7 +136,7 @@ public ModelVersionData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -243,7 +243,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public ModelVersionDataImpl define(String name) { - return new ModelVersionDataImpl(name, this.manager()); + 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/OnlineDeploymentDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java index 0327c04149902..2666a2239f6a6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java @@ -8,23 +8,21 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.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.OnlineDeploymentData; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentDetails; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineDeploymentPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.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 OnlineDeploymentDataImpl - implements OnlineDeploymentData, OnlineDeploymentData.Definition, OnlineDeploymentData.Update { - private OnlineDeploymentDataInner innerObject; +public final class OnlineDeploymentImpl + implements OnlineDeployment, OnlineDeployment.Definition, OnlineDeployment.Update { + private OnlineDeploymentInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -61,7 +59,7 @@ public String kind() { return this.innerModel().kind(); } - public OnlineDeploymentDetails properties() { + public OnlineDeploymentProperties properties() { return this.innerModel().properties(); } @@ -85,7 +83,7 @@ public String resourceGroupName() { return resourceGroupName; } - public OnlineDeploymentDataInner innerModel() { + public OnlineDeploymentInner innerModel() { return this.innerObject; } @@ -101,9 +99,9 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String deploymentName; - private PartialOnlineDeploymentPartialTrackedResource updateBody; + private PartialMinimalTrackedResourceWithSku updateBody; - public OnlineDeploymentDataImpl withExistingOnlineEndpoint( + public OnlineDeploymentImpl withExistingOnlineEndpoint( String resourceGroupName, String workspaceName, String endpointName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; @@ -111,7 +109,7 @@ public OnlineDeploymentDataImpl withExistingOnlineEndpoint( return this; } - public OnlineDeploymentData create() { + public OnlineDeployment create() { this.innerObject = serviceManager .serviceClient() @@ -121,7 +119,7 @@ public OnlineDeploymentData create() { return this; } - public OnlineDeploymentData create(Context context) { + public OnlineDeployment create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -131,19 +129,18 @@ public OnlineDeploymentData create(Context context) { return this; } - OnlineDeploymentDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OnlineDeploymentDataInner(); + OnlineDeploymentImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new OnlineDeploymentInner(); this.serviceManager = serviceManager; this.deploymentName = name; } - public OnlineDeploymentDataImpl update() { - this.updateBody = new PartialOnlineDeploymentPartialTrackedResource(); + public OnlineDeploymentImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithSku(); return this; } - public OnlineDeploymentData apply() { + public OnlineDeployment apply() { this.innerObject = serviceManager .serviceClient() @@ -152,7 +149,7 @@ public OnlineDeploymentData apply() { return this; } - public OnlineDeploymentData apply(Context context) { + public OnlineDeployment apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -161,8 +158,8 @@ public OnlineDeploymentData apply(Context context) { return this; } - OnlineDeploymentDataImpl( - OnlineDeploymentDataInner innerObject, + OnlineDeploymentImpl( + OnlineDeploymentInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -172,7 +169,7 @@ public OnlineDeploymentData apply(Context context) { this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "deployments"); } - public OnlineDeploymentData refresh() { + public OnlineDeployment refresh() { this.innerObject = serviceManager .serviceClient() @@ -182,7 +179,7 @@ public OnlineDeploymentData refresh() { return this; } - public OnlineDeploymentData refresh(Context context) { + public OnlineDeployment refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -204,22 +201,22 @@ public Response getLogsWithResponse(DeploymentLogsRequest body, .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); } - public OnlineDeploymentDataImpl withRegion(Region location) { + public OnlineDeploymentImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; } - public OnlineDeploymentDataImpl withRegion(String location) { + public OnlineDeploymentImpl withRegion(String location) { this.innerModel().withLocation(location); return this; } - public OnlineDeploymentDataImpl withProperties(OnlineDeploymentDetails properties) { + public OnlineDeploymentImpl withProperties(OnlineDeploymentProperties properties) { this.innerModel().withProperties(properties); return this; } - public OnlineDeploymentDataImpl withTags(Map tags) { + public OnlineDeploymentImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); return this; @@ -229,37 +226,22 @@ public OnlineDeploymentDataImpl withTags(Map tags) { } } - public OnlineDeploymentDataImpl withIdentity(ManagedServiceIdentity identity) { + public OnlineDeploymentImpl withIdentity(ManagedServiceIdentity identity) { this.innerModel().withIdentity(identity); return this; } - public OnlineDeploymentDataImpl withKind(String kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateBody.withKind(kind); - return this; - } - } - - public OnlineDeploymentDataImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public OnlineDeploymentDataImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); + public OnlineDeploymentImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } - public OnlineDeploymentDataImpl withProperties(PartialOnlineDeployment properties) { - this.updateBody.withProperties(properties); + public OnlineDeploymentImpl withSku(Sku sku) { + this.innerModel().withSku(sku); return this; } - public OnlineDeploymentDataImpl withSku(PartialSku sku) { + public OnlineDeploymentImpl withSku(PartialSku sku) { this.updateBody.withSku(sku); return this; } 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 index 5f49d40201d0c..2214d99f635da 100644 --- 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 @@ -35,11 +35,11 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.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.PartialOnlineDeploymentPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -116,7 +116,7 @@ Mono>> delete( + "/deployments/{deploymentName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -142,7 +142,7 @@ Mono>> update( @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialOnlineDeploymentPartialTrackedResource body, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, @HeaderParam("Accept") String accept, Context context); @@ -161,7 +161,7 @@ Mono>> createOrUpdate( @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OnlineDeploymentDataInner body, + @BodyParam("application/json") OnlineDeploymentInner body, @HeaderParam("Accept") String accept, Context context); @@ -241,7 +241,7 @@ Mono> listSkusNext( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { if (this.client.getEndpoint() == null) { return Mono @@ -282,7 +282,7 @@ private Mono> listSinglePageAsync( skip, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -311,7 +311,7 @@ private Mono> listSinglePageAsync( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String endpointName, @@ -382,7 +382,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + 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), @@ -401,7 +401,7 @@ private PagedFlux listAsync( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String endpointName) { final String orderBy = null; final Integer top = null; @@ -427,7 +427,7 @@ private PagedFlux listAsync( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String endpointName, @@ -452,7 +452,7 @@ private PagedFlux listAsync( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String endpointName) { final String orderBy = null; final Integer top = null; @@ -476,7 +476,7 @@ public PagedIterable list( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String endpointName, @@ -775,7 +775,7 @@ public void delete( * @return inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { if (this.client.getEndpoint() == null) { return Mono @@ -834,7 +834,7 @@ private Mono> getWithResponseAsync( * @return inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -889,7 +889,7 @@ private Mono> getWithResponseAsync( * @return inference Deployment Deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono getAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -908,7 +908,7 @@ private Mono getAsync( * @return inference Deployment Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentDataInner get( + public OnlineDeploymentInner get( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { return getAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); } @@ -927,7 +927,7 @@ public OnlineDeploymentDataInner get( * @return inference Deployment Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); } @@ -951,7 +951,7 @@ private Mono>> updateWithResponseAsync( String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body) { + PartialMinimalTrackedResourceWithSku body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1021,7 +1021,7 @@ private Mono>> updateWithResponseAsync( String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body, + PartialMinimalTrackedResourceWithSku body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1083,21 +1083,21 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentDataInner> beginUpdateAsync( + private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body) { + PartialMinimalTrackedResourceWithSku body) { Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - OnlineDeploymentDataInner.class, - OnlineDeploymentDataInner.class, + OnlineDeploymentInner.class, + OnlineDeploymentInner.class, this.client.getContext()); } @@ -1116,24 +1116,20 @@ private PollerFlux, OnlineDeploymentDataIn * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentDataInner> beginUpdateAsync( + private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body, + 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(), - OnlineDeploymentDataInner.class, - OnlineDeploymentDataInner.class, - context); + .getLroResult( + mono, this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); } /** @@ -1150,12 +1146,12 @@ private PollerFlux, OnlineDeploymentDataIn * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentDataInner> beginUpdate( + public SyncPoller, OnlineDeploymentInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body) { + PartialMinimalTrackedResourceWithSku body) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).getSyncPoller(); } @@ -1174,12 +1170,12 @@ public SyncPoller, OnlineDeploymentDataInn * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentDataInner> beginUpdate( + public SyncPoller, OnlineDeploymentInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body, + PartialMinimalTrackedResourceWithSku body, Context context) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .getSyncPoller(); @@ -1199,12 +1195,12 @@ public SyncPoller, OnlineDeploymentDataInn * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body) { + PartialMinimalTrackedResourceWithSku body) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1225,12 +1221,12 @@ private Mono updateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body, + PartialMinimalTrackedResourceWithSku body, Context context) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .last() @@ -1251,12 +1247,12 @@ private Mono updateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentDataInner update( + public OnlineDeploymentInner update( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body) { + PartialMinimalTrackedResourceWithSku body) { return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); } @@ -1275,12 +1271,12 @@ public OnlineDeploymentDataInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentDataInner update( + public OnlineDeploymentInner update( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body, + PartialMinimalTrackedResourceWithSku body, Context context) { return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); } @@ -1304,7 +1300,7 @@ private Mono>> createOrUpdateWithResponseAsync( String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body) { + OnlineDeploymentInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1374,7 +1370,7 @@ private Mono>> createOrUpdateWithResponseAsync( String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body, + OnlineDeploymentInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1436,21 +1432,21 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentDataInner> beginCreateOrUpdateAsync( + private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body) { + OnlineDeploymentInner body) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - OnlineDeploymentDataInner.class, - OnlineDeploymentDataInner.class, + OnlineDeploymentInner.class, + OnlineDeploymentInner.class, this.client.getContext()); } @@ -1469,12 +1465,12 @@ private PollerFlux, OnlineDeploymentDataIn * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentDataInner> beginCreateOrUpdateAsync( + private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body, + OnlineDeploymentInner body, Context context) { context = this.client.mergeContext(context); Mono>> mono = @@ -1482,12 +1478,8 @@ private PollerFlux, OnlineDeploymentDataIn resourceGroupName, workspaceName, endpointName, deploymentName, body, context); return this .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineDeploymentDataInner.class, - OnlineDeploymentDataInner.class, - context); + .getLroResult( + mono, this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); } /** @@ -1504,12 +1496,12 @@ private PollerFlux, OnlineDeploymentDataIn * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentDataInner> beginCreateOrUpdate( + public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body) { + OnlineDeploymentInner body) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .getSyncPoller(); } @@ -1529,12 +1521,12 @@ public SyncPoller, OnlineDeploymentDataInn * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentDataInner> beginCreateOrUpdate( + public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body, + OnlineDeploymentInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .getSyncPoller(); @@ -1554,12 +1546,12 @@ public SyncPoller, OnlineDeploymentDataInn * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body) { + OnlineDeploymentInner body) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1580,12 +1572,12 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body, + OnlineDeploymentInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .last() @@ -1606,12 +1598,12 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentDataInner createOrUpdate( + public OnlineDeploymentInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body) { + OnlineDeploymentInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); } @@ -1630,12 +1622,12 @@ public OnlineDeploymentDataInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentDataInner createOrUpdate( + public OnlineDeploymentInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentDataInner body, + OnlineDeploymentInner body, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .block(); @@ -2144,7 +2136,7 @@ public PagedIterable listSkus( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2157,7 +2149,7 @@ private Mono> listNextSinglePageAsync(S final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -2181,7 +2173,7 @@ private Mono> listNextSinglePageAsync(S * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index 85265edfcdeb2..bd22d0ec5e69d 100644 --- 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 @@ -11,11 +11,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.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.OnlineDeploymentData; +import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; import com.azure.resourcemanager.machinelearning.models.OnlineDeployments; import com.azure.resourcemanager.machinelearning.models.SkuResource; @@ -33,14 +33,13 @@ public OnlineDeploymentsImpl( this.serviceManager = serviceManager; } - public PagedIterable list( - String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner = + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return Utils.mapPage(inner, inner1 -> new OnlineDeploymentDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String endpointName, @@ -48,9 +47,9 @@ public PagedIterable list( Integer top, String skip, Context context) { - PagedIterable inner = + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new OnlineDeploymentDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { @@ -62,20 +61,20 @@ public void delete( this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); } - public OnlineDeploymentData get( + public OnlineDeployment get( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - OnlineDeploymentDataInner inner = + OnlineDeploymentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); if (inner != null) { - return new OnlineDeploymentDataImpl(inner, this.manager()); + return new OnlineDeploymentImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - Response inner = + Response inner = this .serviceClient() .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); @@ -84,7 +83,7 @@ public Response getWithResponse( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OnlineDeploymentDataImpl(inner.getValue(), this.manager())); + new OnlineDeploymentImpl(inner.getValue(), this.manager())); } else { return null; } @@ -149,7 +148,7 @@ public PagedIterable listSkus( return Utils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); } - public OnlineDeploymentData getById(String id) { + public OnlineDeployment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -185,7 +184,7 @@ public OnlineDeploymentData getById(String id) { .getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -295,7 +294,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public OnlineDeploymentDataImpl define(String name) { - return new OnlineDeploymentDataImpl(name, this.manager()); + 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/OnlineEndpointDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointDataImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java index d224776249ddb..7fdbb9ba754f1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointDataImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java @@ -8,24 +8,21 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointDataInner; +import com.azure.resourcemanager.machinelearning.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.OnlineEndpointData; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointDetails; +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.PartialOnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineEndpointPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.PartialSku; +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 OnlineEndpointDataImpl - implements OnlineEndpointData, OnlineEndpointData.Definition, OnlineEndpointData.Update { - private OnlineEndpointDataInner innerObject; +public final class OnlineEndpointImpl implements OnlineEndpoint, OnlineEndpoint.Definition, OnlineEndpoint.Update { + private OnlineEndpointInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -62,7 +59,7 @@ public String kind() { return this.innerModel().kind(); } - public OnlineEndpointDetails properties() { + public OnlineEndpointProperties properties() { return this.innerModel().properties(); } @@ -86,7 +83,7 @@ public String resourceGroupName() { return resourceGroupName; } - public OnlineEndpointDataInner innerModel() { + public OnlineEndpointInner innerModel() { return this.innerObject; } @@ -100,15 +97,15 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String endpointName; - private PartialOnlineEndpointPartialTrackedResource updateBody; + private PartialMinimalTrackedResourceWithIdentity updateBody; - public OnlineEndpointDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public OnlineEndpointImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public OnlineEndpointData create() { + public OnlineEndpoint create() { this.innerObject = serviceManager .serviceClient() @@ -117,7 +114,7 @@ public OnlineEndpointData create() { return this; } - public OnlineEndpointData create(Context context) { + public OnlineEndpoint create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -126,19 +123,18 @@ public OnlineEndpointData create(Context context) { return this; } - OnlineEndpointDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OnlineEndpointDataInner(); + OnlineEndpointImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new OnlineEndpointInner(); this.serviceManager = serviceManager; this.endpointName = name; } - public OnlineEndpointDataImpl update() { - this.updateBody = new PartialOnlineEndpointPartialTrackedResource(); + public OnlineEndpointImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithIdentity(); return this; } - public OnlineEndpointData apply() { + public OnlineEndpoint apply() { this.innerObject = serviceManager .serviceClient() @@ -147,7 +143,7 @@ public OnlineEndpointData apply() { return this; } - public OnlineEndpointData apply(Context context) { + public OnlineEndpoint apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -156,8 +152,8 @@ public OnlineEndpointData apply(Context context) { return this; } - OnlineEndpointDataImpl( - OnlineEndpointDataInner innerObject, + OnlineEndpointImpl( + OnlineEndpointInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -166,7 +162,7 @@ public OnlineEndpointData apply(Context context) { this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); } - public OnlineEndpointData refresh() { + public OnlineEndpoint refresh() { this.innerObject = serviceManager .serviceClient() @@ -176,7 +172,7 @@ public OnlineEndpointData refresh() { return this; } - public OnlineEndpointData refresh(Context context) { + public OnlineEndpoint refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -214,22 +210,22 @@ public Response getTokenWithResponse(Context context) { .getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); } - public OnlineEndpointDataImpl withRegion(Region location) { + public OnlineEndpointImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; } - public OnlineEndpointDataImpl withRegion(String location) { + public OnlineEndpointImpl withRegion(String location) { this.innerModel().withLocation(location); return this; } - public OnlineEndpointDataImpl withProperties(OnlineEndpointDetails properties) { + public OnlineEndpointImpl withProperties(OnlineEndpointProperties properties) { this.innerModel().withProperties(properties); return this; } - public OnlineEndpointDataImpl withTags(Map tags) { + public OnlineEndpointImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); return this; @@ -239,41 +235,26 @@ public OnlineEndpointDataImpl withTags(Map tags) { } } - public OnlineEndpointDataImpl withIdentity(ManagedServiceIdentity identity) { + public OnlineEndpointImpl withIdentity(ManagedServiceIdentity identity) { this.innerModel().withIdentity(identity); return this; } - public OnlineEndpointDataImpl withKind(String kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateBody.withKind(kind); - return this; - } + public OnlineEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; } - public OnlineEndpointDataImpl withSku(Sku sku) { + public OnlineEndpointImpl withSku(Sku sku) { this.innerModel().withSku(sku); return this; } - public OnlineEndpointDataImpl withIdentity(PartialManagedServiceIdentity identity) { + public OnlineEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { this.updateBody.withIdentity(identity); return this; } - public OnlineEndpointDataImpl withProperties(PartialOnlineEndpoint properties) { - this.updateBody.withProperties(properties); - return this; - } - - public OnlineEndpointDataImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); - return this; - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java index 7f3222df5d62a..00fb8acee584a 100644 --- 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 @@ -36,11 +36,11 @@ import com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointDataInner; +import com.azure.resourcemanager.machinelearning.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.PartialOnlineEndpointPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -116,7 +116,7 @@ Mono>> delete( + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -139,7 +139,7 @@ Mono>> update( @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialOnlineEndpointPartialTrackedResource body, + @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, @HeaderParam("Accept") String accept, Context context); @@ -156,7 +156,7 @@ Mono>> createOrUpdate( @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OnlineEndpointDataInner body, + @BodyParam("application/json") OnlineEndpointInner body, @HeaderParam("Accept") String accept, Context context); @@ -243,7 +243,7 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -292,7 +292,7 @@ private Mono> listSinglePageAsync( orderBy, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -326,7 +326,7 @@ private Mono> listSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String name, @@ -405,7 +405,7 @@ private Mono> listSinglePageAsync( * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -433,7 +433,7 @@ private PagedFlux listAsync( * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String name = null; final Integer count = null; final EndpointComputeType computeType = null; @@ -469,7 +469,7 @@ private PagedFlux listAsync(String resourceGroupName, S * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String name, @@ -507,7 +507,7 @@ private PagedFlux listAsync( * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String name = null; final Integer count = null; final EndpointComputeType computeType = null; @@ -540,7 +540,7 @@ public PagedIterable list(String resourceGroupName, Str * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -820,7 +820,7 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi * @return online Endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName) { if (this.client.getEndpoint() == null) { return Mono @@ -874,7 +874,7 @@ private Mono> getWithResponseAsync( * @return online Endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -924,8 +924,7 @@ private Mono> getWithResponseAsync( * @return online Endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -942,7 +941,7 @@ private Mono getAsync( * @return online Endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName) { + public OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { return getAsync(resourceGroupName, workspaceName, endpointName).block(); } @@ -959,7 +958,7 @@ public OnlineEndpointDataInner get(String resourceGroupName, String workspaceNam * @return online Endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } @@ -981,7 +980,7 @@ private Mono>> updateWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1045,7 +1044,7 @@ private Mono>> updateWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1102,20 +1101,20 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointDataInner> beginUpdateAsync( + private PollerFlux, OnlineEndpointInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - OnlineEndpointDataInner.class, - OnlineEndpointDataInner.class, + OnlineEndpointInner.class, + OnlineEndpointInner.class, this.client.getContext()); } @@ -1133,23 +1132,19 @@ private PollerFlux, OnlineEndpointDataInner> * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointDataInner> beginUpdateAsync( + private PollerFlux, OnlineEndpointInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body, + 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(), - OnlineEndpointDataInner.class, - OnlineEndpointDataInner.class, - context); + .getLroResult( + mono, this.client.getHttpPipeline(), OnlineEndpointInner.class, OnlineEndpointInner.class, context); } /** @@ -1165,11 +1160,11 @@ private PollerFlux, OnlineEndpointDataInner> * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointDataInner> beginUpdate( + public SyncPoller, OnlineEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); } @@ -1187,11 +1182,11 @@ public SyncPoller, OnlineEndpointDataInner> * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointDataInner> beginUpdate( + public SyncPoller, OnlineEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); } @@ -1209,11 +1204,11 @@ public SyncPoller, OnlineEndpointDataInner> * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1233,11 +1228,11 @@ private Mono updateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context) { return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) .last() @@ -1257,11 +1252,11 @@ private Mono updateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointDataInner update( + public OnlineEndpointInner update( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body) { + PartialMinimalTrackedResourceWithIdentity body) { return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); } @@ -1279,11 +1274,11 @@ public OnlineEndpointDataInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointDataInner update( + public OnlineEndpointInner update( String resourceGroupName, String workspaceName, String endpointName, - PartialOnlineEndpointPartialTrackedResource body, + PartialMinimalTrackedResourceWithIdentity body, Context context) { return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } @@ -1302,7 +1297,7 @@ public OnlineEndpointDataInner update( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body) { + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1366,7 +1361,7 @@ private Mono>> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointDataInner body, + OnlineEndpointInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1423,17 +1418,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body) { + private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - OnlineEndpointDataInner.class, - OnlineEndpointDataInner.class, + OnlineEndpointInner.class, + OnlineEndpointInner.class, this.client.getContext()); } @@ -1451,23 +1446,19 @@ private PollerFlux, OnlineEndpointDataInner> * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointDataInner> beginCreateOrUpdateAsync( + private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointDataInner body, + 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(), - OnlineEndpointDataInner.class, - OnlineEndpointDataInner.class, - context); + .getLroResult( + mono, this.client.getHttpPipeline(), OnlineEndpointInner.class, OnlineEndpointInner.class, context); } /** @@ -1483,8 +1474,8 @@ private PollerFlux, OnlineEndpointDataInner> * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body) { + public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); } @@ -1502,11 +1493,11 @@ public SyncPoller, OnlineEndpointDataInner> * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointDataInner> beginCreateOrUpdate( + public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointDataInner body, + OnlineEndpointInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); } @@ -1524,8 +1515,8 @@ public SyncPoller, OnlineEndpointDataInner> * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body) { + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1545,11 +1536,11 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointDataInner body, + OnlineEndpointInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) .last() @@ -1569,8 +1560,8 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body) { + public OnlineEndpointInner createOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); } @@ -1588,11 +1579,11 @@ public OnlineEndpointDataInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointDataInner createOrUpdate( + public OnlineEndpointInner createOrUpdate( String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointDataInner body, + OnlineEndpointInner body, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } @@ -2218,7 +2209,7 @@ public Response getTokenWithResponse( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2231,7 +2222,7 @@ private Mono> listNextSinglePageAsync(Str final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -2255,7 +2246,7 @@ private Mono> listNextSinglePageAsync(Str * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be 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 index d5c61a521bcf0..d07c310deef36 100644 --- 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 @@ -12,11 +12,11 @@ import com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointDataInner; +import com.azure.resourcemanager.machinelearning.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.OnlineEndpointData; +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; @@ -35,12 +35,12 @@ public OnlineEndpointsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new OnlineEndpointDataImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -51,7 +51,7 @@ public PagedIterable list( String properties, OrderString orderBy, Context context) { - PagedIterable inner = + PagedIterable inner = this .serviceClient() .list( @@ -65,7 +65,7 @@ public PagedIterable list( properties, orderBy, context); - return Utils.mapPage(inner, inner1 -> new OnlineEndpointDataImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String endpointName) { @@ -76,25 +76,25 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); } - public OnlineEndpointData get(String resourceGroupName, String workspaceName, String endpointName) { - OnlineEndpointDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); + public OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { + OnlineEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); if (inner != null) { - return new OnlineEndpointDataImpl(inner, this.manager()); + return new OnlineEndpointImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OnlineEndpointDataImpl(inner.getValue(), this.manager())); + new OnlineEndpointImpl(inner.getValue(), this.manager())); } else { return null; } @@ -162,7 +162,7 @@ public Response getTokenWithResponse( } } - public OnlineEndpointData getById(String id) { + public OnlineEndpoint getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -189,7 +189,7 @@ public OnlineEndpointData getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -278,7 +278,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public OnlineEndpointDataImpl define(String name) { - return new OnlineEndpointDataImpl(name, this.manager()); + 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/ScheduleImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java new file mode 100644 index 0000000000000..a4b080c85af25 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights 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 new file mode 100644 index 0000000000000..86b71e6999d70 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java @@ -0,0 +1,1115 @@ +// Copyright (c) Microsoft Corporation. All rights 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.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") + private 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, + @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + 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; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, 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; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + } + + /** + * 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 getAsync(resourceGroupName, workspaceName, name).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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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(); + } + + /** + * 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 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 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 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 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 new file mode 100644 index 0000000000000..8502579c687c1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights 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.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, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, skip, 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 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 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 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/WorkspaceConnectionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java similarity index 60% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java index 168d77946ab13..9ff113b0e7ac1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java @@ -6,17 +6,18 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnection; +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 WorkspaceConnectionImpl implements WorkspaceConnection, WorkspaceConnection.Definition { - private WorkspaceConnectionInner innerObject; +public final class WorkspaceConnectionPropertiesV2BasicResourceImpl + implements WorkspaceConnectionPropertiesV2BasicResource, WorkspaceConnectionPropertiesV2BasicResource.Definition { + private WorkspaceConnectionPropertiesV2BasicResourceInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - WorkspaceConnectionImpl( - WorkspaceConnectionInner innerObject, + WorkspaceConnectionPropertiesV2BasicResourceImpl( + WorkspaceConnectionPropertiesV2BasicResourceInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -34,31 +35,15 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String category() { - return this.innerModel().category(); - } - - public String target() { - return this.innerModel().target(); + public WorkspaceConnectionPropertiesV2 properties() { + return this.innerModel().properties(); } - public String authType() { - return this.innerModel().authType(); - } - - public String value() { - return this.innerModel().value(); - } - - public ValueFormat valueFormat() { - return this.innerModel().valueFormat(); + public SystemData systemData() { + return this.innerModel().systemData(); } - public WorkspaceConnectionInner innerModel() { + public WorkspaceConnectionPropertiesV2BasicResourceInner innerModel() { return this.innerObject; } @@ -72,13 +57,14 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String connectionName; - public WorkspaceConnectionImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public WorkspaceConnectionPropertiesV2BasicResourceImpl withExistingWorkspace( + String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public WorkspaceConnection create() { + public WorkspaceConnectionPropertiesV2BasicResource create() { this.innerObject = serviceManager .serviceClient() @@ -88,7 +74,7 @@ public WorkspaceConnection create() { return this; } - public WorkspaceConnection create(Context context) { + public WorkspaceConnectionPropertiesV2BasicResource create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -98,14 +84,14 @@ public WorkspaceConnection create(Context context) { return this; } - WorkspaceConnectionImpl( + WorkspaceConnectionPropertiesV2BasicResourceImpl( String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new WorkspaceConnectionInner(); + this.innerObject = new WorkspaceConnectionPropertiesV2BasicResourceInner(); this.serviceManager = serviceManager; this.connectionName = name; } - public WorkspaceConnection refresh() { + public WorkspaceConnectionPropertiesV2BasicResource refresh() { this.innerObject = serviceManager .serviceClient() @@ -115,7 +101,7 @@ public WorkspaceConnection refresh() { return this; } - public WorkspaceConnection refresh(Context context) { + public WorkspaceConnectionPropertiesV2BasicResource refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -125,28 +111,8 @@ public WorkspaceConnection refresh(Context context) { return this; } - public WorkspaceConnectionImpl withCategory(String category) { - this.innerModel().withCategory(category); - return this; - } - - public WorkspaceConnectionImpl withTarget(String target) { - this.innerModel().withTarget(target); - return this; - } - - public WorkspaceConnectionImpl withAuthType(String authType) { - this.innerModel().withAuthType(authType); - return this; - } - - public WorkspaceConnectionImpl withValue(String value) { - this.innerModel().withValue(value); - return this; - } - - public WorkspaceConnectionImpl withValueFormat(ValueFormat valueFormat) { - this.innerModel().withValueFormat(valueFormat); + 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 index 3f1740d50c1e8..a1d832e12b3b7 100644 --- 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 @@ -29,8 +29,8 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearning.models.PaginatedWorkspaceConnectionsList; +import 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. */ @@ -61,46 +61,45 @@ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnection @ServiceInterface(name = "AzureMachineLearning") private interface WorkspaceConnectionsService { @Headers({"Content-Type: application/json"}) - @Get( + @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + 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, - @QueryParam("target") String target, - @QueryParam("category") String category, + @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Put( + @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( + 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, - @BodyParam("application/json") WorkspaceConnectionInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Get( + @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> delete( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -111,38 +110,51 @@ Mono> get( Context context); @Headers({"Content-Type: application/json"}) - @Delete( + @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({200, 204}) + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono> list( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, + @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); } /** - * List all connections under a AML workspace. + * 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 target Target of the workspace connection. - * @param category Category of the workspace connection. + * @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 paginated list of Workspace connection objects along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category) { + private Mono> createWithResponseAsync( + String resourceGroupName, + String workspaceName, + String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -162,45 +174,52 @@ private Mono> listSinglePageAsync( 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 - .list( + .create( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, this.client.getApiVersion(), - target, - category, + parameters, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all connections under a AML workspace. + * 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 target Target of the workspace connection. - * @param category Category of the workspace connection. + * @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 paginated list of Workspace connection objects along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category, Context context) { + private Mono> createWithResponseAsync( + String resourceGroupName, + String workspaceName, + String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner parameters, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -220,130 +239,109 @@ private Mono> listSinglePageAsync( 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 - .list( + .create( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, this.client.getApiVersion(), - target, - category, + parameters, accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String target, String category) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category)); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String target = null; - final String category = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category)); + context); } /** - * List all connections under a AML workspace. + * 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 target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. + * @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 paginated list of Workspace connection objects as paginated response with {@link PagedFlux}. + * @return the response body on successful completion of {@link Mono}. */ - @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)); + @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())); } /** - * List all connections under a AML workspace. + * 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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. + * @return the response. */ - @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)); + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceConnectionPropertiesV2BasicResourceInner create( + String resourceGroupName, + String workspaceName, + String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { + return createAsync(resourceGroupName, workspaceName, connectionName, parameters).block(); } /** - * List all connections under a AML workspace. + * 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 target Target of the workspace connection. - * @param category Category of the workspace connection. + * @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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @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)); + @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(); } /** - * Add a new workspace connection. + * 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 parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection along with {@link Response} on successful completion of {@link Mono}. + * @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, WorkspaceConnectionInner parameters) { + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -366,49 +364,38 @@ private Mono> createWithResponseAsync( 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( + .get( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), - parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Add a new workspace connection. + * 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 parameters The object for creating or updating a new workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection along with {@link Response} on successful completion of {@link Mono}. + * @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, - WorkspaceConnectionInner parameters, - Context context) { + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -431,88 +418,75 @@ private Mono> createWithResponseAsync( 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( + .get( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), - parameters, accept, context); } /** - * Add a new workspace connection. + * 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 parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters) + private Mono getAsync( + String resourceGroupName, String workspaceName, String connectionName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Add a new workspace connection. + * 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 parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionInner create( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters) { - return createAsync(resourceGroupName, workspaceName, connectionName, parameters).block(); + public WorkspaceConnectionPropertiesV2BasicResourceInner get( + String resourceGroupName, String workspaceName, String connectionName) { + return getAsync(resourceGroupName, workspaceName, connectionName).block(); } /** - * Add a new workspace connection. + * 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 parameters The object for creating or updating a new workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionInner parameters, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters, context).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String connectionName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); } /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -520,11 +494,10 @@ public Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection along with {@link Response} on successful completion of {@link - * Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String workspaceName, String connectionName) { if (this.client.getEndpoint() == null) { return Mono @@ -553,7 +526,7 @@ private Mono> getWithResponseAsync( .withContext( context -> service - .get( + .delete( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -566,7 +539,7 @@ private Mono> getWithResponseAsync( } /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -575,11 +548,10 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection along with {@link Response} on successful completion of {@link - * Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String workspaceName, String connectionName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -606,7 +578,7 @@ private Mono> getWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .get( + .delete( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -618,7 +590,7 @@ private Mono> getWithResponseAsync( } /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -626,17 +598,16 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String connectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String connectionName) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName) + .flatMap(ignored -> Mono.empty()); } /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -644,15 +615,14 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionInner get(String resourceGroupName, String workspaceName, String connectionName) { - return getAsync(resourceGroupName, workspaceName, connectionName).block(); + public void delete(String resourceGroupName, String workspaceName, String connectionName) { + deleteAsync(resourceGroupName, workspaceName, connectionName).block(); } /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -661,28 +631,29 @@ public WorkspaceConnectionInner get(String resourceGroupName, String workspaceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response deleteWithResponse( String resourceGroupName, String workspaceName, String connectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); } /** - * Delete a workspace connection. + * 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 connectionName Friendly name of the workspace connection. + * @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 {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String target, String category) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -702,41 +673,49 @@ private Mono> deleteWithResponseAsync( 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( + .list( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - connectionName, + 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())); } /** - * Delete a workspace connection. + * 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 connectionName Friendly name of the workspace connection. + * @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 {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, Context context) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String target, String category, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -756,70 +735,198 @@ private Mono> deleteWithResponseAsync( 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( + .list( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - connectionName, + target, + category, this.client.getApiVersion(), accept, - context); + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** - * Delete a workspace connection. + * 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 connectionName Friendly name of the workspace connection. + * @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 A {@link Mono} that completes when a successful response is received. + * @return the paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String connectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(ignored -> Mono.empty()); + @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)); } /** - * Delete a workspace connection. + * 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 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 paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - deleteAsync(resourceGroupName, workspaceName, connectionName).block(); + @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)); } /** - * Delete a workspace connection. + * 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 connectionName Friendly name of the workspace connection. + * @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 {@link Response}. + * @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 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) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + private Mono> listNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the 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 index 323c6294b7900..369777b1f7c0f 100644 --- 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 @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnection; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnections; public final class WorkspaceConnectionsImpl implements WorkspaceConnections { @@ -28,37 +28,27 @@ public WorkspaceConnectionsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new WorkspaceConnectionImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, target, category, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceConnectionImpl(inner1, this.manager())); - } - - public WorkspaceConnection get(String resourceGroupName, String workspaceName, String connectionName) { - WorkspaceConnectionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, connectionName); + public WorkspaceConnectionPropertiesV2BasicResource get( + String resourceGroupName, String workspaceName, String connectionName) { + WorkspaceConnectionPropertiesV2BasicResourceInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, connectionName); if (inner != null) { - return new WorkspaceConnectionImpl(inner, this.manager()); + return new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String resourceGroupName, String workspaceName, String connectionName, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, connectionName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceConnectionImpl(inner.getValue(), this.manager())); + new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); } else { return null; } @@ -73,7 +63,23 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); } - public WorkspaceConnection getById(String id) { + 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 @@ -99,7 +105,7 @@ public WorkspaceConnection getById(String id) { return this.getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -185,7 +191,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager return this.serviceManager; } - public WorkspaceConnectionImpl define(String name) { - return new WorkspaceConnectionImpl(name, this.manager()); + 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/WorkspaceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java index c9a699fc48b09..96ae21b67b5b5 100644 --- 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 @@ -14,6 +14,7 @@ import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResult; import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; +import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; import com.azure.resourcemanager.machinelearning.models.ListNotebookKeysResult; import com.azure.resourcemanager.machinelearning.models.ListStorageAccountKeysResult; import com.azure.resourcemanager.machinelearning.models.ListWorkspaceKeysResult; @@ -21,12 +22,12 @@ 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.WorkspaceProvisioningState; import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; import java.util.Collections; import java.util.List; @@ -107,7 +108,7 @@ public String discoveryUrl() { return this.innerModel().discoveryUrl(); } - public ProvisioningState provisioningState() { + public WorkspaceProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -191,6 +192,18 @@ public String mlFlowTrackingUri() { return this.innerModel().mlFlowTrackingUri(); } + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); + } + + public String softDeletedAt() { + return this.innerModel().softDeletedAt(); + } + + public String scheduledPurgeDate() { + return this.innerModel().scheduledPurgeDate(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -517,6 +530,16 @@ public WorkspaceImpl withPrimaryUserAssignedIdentity(String primaryUserAssignedI } } + public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { + this.innerModel().withV1LegacyMode(v1LegacyMode); + return this; + } + + public WorkspaceImpl withEncryption(EncryptionUpdateProperties encryption) { + this.updateParameters.withEncryption(encryption); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java index 047fce75bcc71..67f583f1a6357 100644 --- 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 @@ -10,11 +10,11 @@ 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 com.azure.resourcemanager.machinelearning.models.WorkspaceProvisioningState; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -63,7 +63,7 @@ public String discoveryUrl() { return this.innerModel().discoveryUrl(); } - public ProvisioningState provisioningState() { + public WorkspaceProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -147,6 +147,18 @@ public String mlFlowTrackingUri() { return this.innerModel().mlFlowTrackingUri(); } + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); + } + + public String softDeletedAt() { + return this.innerModel().softDeletedAt(); + } + + public String scheduledPurgeDate() { + return this.innerModel().scheduledPurgeDate(); + } + public WorkspacePropertiesInner innerModel() { return this.innerObject; } 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 index 3ab8405707506..e9c0809a5fd58 100644 --- 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 @@ -16,15 +16,13 @@ @Fluent public final class AksComputeSecrets extends ComputeSecretsInner { /* - * Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. + * 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. + * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. */ @JsonProperty(value = "adminKubeConfig") private String adminKubeConfig; 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 index 662ce009c4eb1..6c974bd848cd7 100644 --- 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 @@ -11,15 +11,13 @@ @Fluent public class AksComputeSecretsProperties { /* - * Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. + * 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. + * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. */ @JsonProperty(value = "adminKubeConfig") private String adminKubeConfig; 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 index 70eb655f389b4..eb86f365cc255 100644 --- 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 @@ -17,23 +17,22 @@ public final class AksNetworkingConfiguration { private String subnetId; /* - * A CIDR notation IP range from which to assign service cluster IPs. It - * must not overlap with any Subnet IP ranges. + * 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. + * 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. + * 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; 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 index e01ce2e594477..5a00f22375a7f 100644 --- 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 @@ -11,44 +11,55 @@ @Immutable public final class AmlComputeNodeInformation { /* - * Node ID. ID of the compute node. + * 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. + * 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. + * 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. + * 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. + * 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. + * Run ID. + * + * ID of the Experiment running on the node, if any else null. */ @JsonProperty(value = "runId", access = JsonProperty.Access.WRITE_ONLY) private String runId; /** - * Get the nodeId property: Node ID. ID of the compute node. + * Get the nodeId property: Node ID. + * + *

ID of the compute node. * * @return the nodeId value. */ @@ -57,7 +68,9 @@ public String nodeId() { } /** - * Get the privateIpAddress property: Private IP address. Private IP address of the compute node. + * Get the privateIpAddress property: Private IP address. + * + *

Private IP address of the compute node. * * @return the privateIpAddress value. */ @@ -66,7 +79,9 @@ public String privateIpAddress() { } /** - * Get the publicIpAddress property: Public IP address. Public IP address of the compute node. + * Get the publicIpAddress property: Public IP address. + * + *

Public IP address of the compute node. * * @return the publicIpAddress value. */ @@ -75,7 +90,9 @@ public String publicIpAddress() { } /** - * Get the port property: Port. SSH port number of the node. + * Get the port property: Port. + * + *

SSH port number of the node. * * @return the port value. */ @@ -94,7 +111,9 @@ public NodeState nodeState() { } /** - * Get the runId property: Run ID. ID of the Experiment running on the node, if any else null. + * Get the runId property: Run ID. + * + *

ID of the Experiment running on the node, if any else null. * * @return the runId value. */ 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 index ae9c7b6f2014b..70e82e64b6d68 100644 --- 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 @@ -6,11 +6,9 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; -import java.util.Map; /** AML Compute properties. */ @Fluent @@ -52,8 +50,7 @@ public final class AmlComputeProperties { private ScaleSettings scaleSettings; /* - * Credentials for an administrator user account that will be created on - * each compute node. + * Credentials for an administrator user account that will be created on each compute node. */ @JsonProperty(value = "userAccountCredentials") private UserAccountCredentials userAccountCredentials; @@ -65,57 +62,59 @@ public final class AmlComputeProperties { 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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; @@ -127,11 +126,11 @@ public final class AmlComputeProperties { 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. + * 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; @@ -140,8 +139,7 @@ public final class AmlComputeProperties { * A property bag containing additional properties. */ @JsonProperty(value = "propertyBag") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map propertyBag; + private Object propertyBag; /** * Get the osType property: Compute OS Type. @@ -306,11 +304,13 @@ public AmlComputeProperties withSubnet(ResourceId subnet) { } /** - * 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. + * 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. */ @@ -319,11 +319,13 @@ public RemoteLoginPortPublicAccess 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. + * 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. @@ -335,11 +337,13 @@ public AmlComputeProperties withRemoteLoginPortPublicAccess( } /** - * 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. + * 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. */ @@ -348,8 +352,9 @@ public AllocationState allocationState() { } /** - * Get the allocationStateTransitionTime property: Allocation state transition time. The time at which the compute - * entered its current allocation state. + * Get the allocationStateTransitionTime property: Allocation state transition time. + * + *

The time at which the compute entered its current allocation state. * * @return the allocationStateTransitionTime value. */ @@ -358,7 +363,9 @@ public OffsetDateTime allocationStateTransitionTime() { } /** - * Get the errors property: Errors. Collection of errors encountered by various compute nodes during node setup. + * Get the errors property: Errors. + * + *

Collection of errors encountered by various compute nodes during node setup. * * @return the errors value. */ @@ -367,8 +374,9 @@ public List errors() { } /** - * Get the currentNodeCount property: Current node count. The number of compute nodes currently assigned to the - * compute. + * Get the currentNodeCount property: Current node count. + * + *

The number of compute nodes currently assigned to the compute. * * @return the currentNodeCount value. */ @@ -377,9 +385,11 @@ public Integer 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. + * 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. */ @@ -397,9 +407,11 @@ public NodeStateCounts 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. + * 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. */ @@ -408,9 +420,11 @@ public Boolean 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. + * 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. @@ -425,7 +439,7 @@ public AmlComputeProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { * * @return the propertyBag value. */ - public Map propertyBag() { + public Object propertyBag() { return this.propertyBag; } @@ -435,7 +449,7 @@ public Map propertyBag() { * @param propertyBag the propertyBag value to set. * @return the AmlComputeProperties object itself. */ - public AmlComputeProperties withPropertyBag(Map propertyBag) { + public AmlComputeProperties withPropertyBag(Object propertyBag) { this.propertyBag = propertyBag; return this; } 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 index 13b9c458027b9..b3756fc29c29e 100644 --- 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 @@ -13,8 +13,7 @@ @Fluent public final class AmlOperationListResult { /* - * List of AML workspace operations supported by the AML workspace resource - * provider. + * List of AML workspace operations supported by the AML workspace resource provider. */ @JsonProperty(value = "value") private List value; 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 index f4f8de510edeb..93a216ff0144f 100644 --- 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 @@ -19,12 +19,11 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("AutoML") @Fluent -public final class AutoMLJob extends JobBaseDetails { +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. + * 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; @@ -47,7 +46,7 @@ public final class AutoMLJob extends JobBaseDetails { * Compute Resource configuration for the job. */ @JsonProperty(value = "resources") - private ResourceConfiguration resources; + private JobResourceConfiguration resources; /* * [Required] This represents scenario which can be one of Tables/NLP/Image @@ -124,7 +123,7 @@ public AutoMLJob withOutputs(Map outputs) { * * @return the resources value. */ - public ResourceConfiguration resources() { + public JobResourceConfiguration resources() { return this.resources; } @@ -134,7 +133,7 @@ public ResourceConfiguration resources() { * @param resources the resources value to set. * @return the AutoMLJob object itself. */ - public AutoMLJob withResources(ResourceConfiguration resources) { + public AutoMLJob withResources(JobResourceConfiguration resources) { this.resources = resources; return this; } @@ -159,6 +158,13 @@ public AutoMLJob withTaskDetails(AutoMLVertical taskDetails) { return this; } + /** {@inheritDoc} */ + @Override + public AutoMLJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + /** {@inheritDoc} */ @Override public AutoMLJob withComputeId(String computeId) { @@ -194,13 +200,6 @@ public AutoMLJob withIsArchived(Boolean isArchived) { return this; } - /** {@inheritDoc} */ - @Override - public AutoMLJob withSchedule(ScheduleBase schedule) { - super.withSchedule(schedule); - return this; - } - /** {@inheritDoc} */ @Override public AutoMLJob withServices(Map services) { 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 index 816c0b483a090..b3748dc49368f 100644 --- 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 @@ -5,6 +5,7 @@ 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; @@ -37,6 +38,19 @@ public class AutoMLVertical { @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; + /** * Get the logVerbosity property: Log verbosity for the job. * @@ -57,11 +71,62 @@ public AutoMLVertical withLogVerbosity(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/AzureBlobDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java index 3b33d6574d4e7..f6c91b3e65964 100644 --- 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 @@ -14,7 +14,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("AzureBlob") @Fluent -public final class AzureBlobDatastore extends DatastoreDetails { +public final class AzureBlobDatastore extends DatastoreProperties { /* * Storage account name. */ @@ -40,12 +40,23 @@ public final class AzureBlobDatastore extends DatastoreDetails { private String protocol; /* - * Indicates which identity to use to authenticate service data access to - * customer's storage. + * Indicates which identity to use to authenticate service data access to customer's storage. */ @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + /** * Get the accountName property: Storage account name. * @@ -149,6 +160,46 @@ public AzureBlobDatastore withServiceDataAccessAuthIdentity( return this; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureBlobDatastore object itself. + */ + public AzureBlobDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureBlobDatastore object itself. + */ + public AzureBlobDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** {@inheritDoc} */ @Override public AzureBlobDatastore withCredentials(DatastoreCredentials credentials) { 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 index a22c78a502e9d..60c1d75e1d10f 100644 --- 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 @@ -15,10 +15,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("AzureDataLakeGen1") @Fluent -public final class AzureDataLakeGen1Datastore extends DatastoreDetails { +public final class AzureDataLakeGen1Datastore extends DatastoreProperties { /* - * Indicates which identity to use to authenticate service data access to - * customer's storage. + * Indicates which identity to use to authenticate service data access to customer's storage. */ @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; @@ -29,6 +28,18 @@ public final class AzureDataLakeGen1Datastore extends DatastoreDetails { @JsonProperty(value = "storeName", required = true) private String storeName; + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + /** * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. @@ -72,6 +83,46 @@ public AzureDataLakeGen1Datastore withStoreName(String storeName) { return this; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureDataLakeGen1Datastore object itself. + */ + public AzureDataLakeGen1Datastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureDataLakeGen1Datastore object itself. + */ + public AzureDataLakeGen1Datastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** {@inheritDoc} */ @Override public AzureDataLakeGen1Datastore withCredentials(DatastoreCredentials credentials) { 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 index c1952e55d9b1c..fd7eaa61a058a 100644 --- 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 @@ -15,7 +15,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("AzureDataLakeGen2") @Fluent -public final class AzureDataLakeGen2Datastore extends DatastoreDetails { +public final class AzureDataLakeGen2Datastore extends DatastoreProperties { /* * [Required] Storage account name. */ @@ -41,12 +41,23 @@ public final class AzureDataLakeGen2Datastore extends DatastoreDetails { private String protocol; /* - * Indicates which identity to use to authenticate service data access to - * customer's storage. + * Indicates which identity to use to authenticate service data access to customer's storage. */ @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + /** * Get the accountName property: [Required] Storage account name. * @@ -150,6 +161,46 @@ public AzureDataLakeGen2Datastore withServiceDataAccessAuthIdentity( return this; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureDataLakeGen2Datastore object itself. + */ + public AzureDataLakeGen2Datastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureDataLakeGen2Datastore object itself. + */ + public AzureDataLakeGen2Datastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** {@inheritDoc} */ @Override public AzureDataLakeGen2Datastore withCredentials(DatastoreCredentials credentials) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java new file mode 100644 index 0000000000000..47ab089383f5d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Base definition for Azure datastore contents configuration. */ +@Fluent +public class AzureDatastore { + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureDatastore object itself. + */ + public AzureDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureDatastore object itself. + */ + public AzureDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * 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/AzureFileDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java index 2c7d422adc329..bc9fdb1018677 100644 --- 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 @@ -15,7 +15,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("AzureFile") @Fluent -public final class AzureFileDatastore extends DatastoreDetails { +public final class AzureFileDatastore extends DatastoreProperties { /* * [Required] Storage account name. */ @@ -29,8 +29,7 @@ public final class AzureFileDatastore extends DatastoreDetails { private String endpoint; /* - * [Required] The name of the Azure file share that the datastore points - * to. + * [Required] The name of the Azure file share that the datastore points to. */ @JsonProperty(value = "fileShareName", required = true) private String fileShareName; @@ -42,12 +41,23 @@ public final class AzureFileDatastore extends DatastoreDetails { private String protocol; /* - * Indicates which identity to use to authenticate service data access to - * customer's storage. + * Indicates which identity to use to authenticate service data access to customer's storage. */ @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + /** * Get the accountName property: [Required] Storage account name. * @@ -151,6 +161,46 @@ public AzureFileDatastore withServiceDataAccessAuthIdentity( return this; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureFileDatastore object itself. + */ + public AzureFileDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureFileDatastore object itself. + */ + public AzureFileDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** {@inheritDoc} */ @Override public AzureFileDatastore withCredentials(DatastoreCredentials credentials) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java similarity index 69% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java index 71c6cb57ca7a5..ff78009e7cdf7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java @@ -7,11 +7,11 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; import java.util.Map; -/** An immutable client-side representation of BatchDeploymentData. */ -public interface BatchDeploymentData { +/** An immutable client-side representation of BatchDeployment. */ +public interface BatchDeployment { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -67,7 +67,7 @@ public interface BatchDeploymentData { * * @return the properties value. */ - BatchDeploymentDetails properties(); + BatchDeploymentProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -105,13 +105,13 @@ public interface BatchDeploymentData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner object. * * @return the inner object. */ - BatchDeploymentDataInner innerModel(); + BatchDeploymentInner innerModel(); - /** The entirety of the BatchDeploymentData definition. */ + /** The entirety of the BatchDeployment definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, @@ -119,12 +119,12 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The BatchDeploymentData definition stages. */ + /** The BatchDeployment definition stages. */ interface DefinitionStages { - /** The first stage of the BatchDeploymentData definition. */ + /** The first stage of the BatchDeployment definition. */ interface Blank extends WithLocation { } - /** The stage of the BatchDeploymentData definition allowing to specify location. */ + /** The stage of the BatchDeployment definition allowing to specify location. */ interface WithLocation { /** * Specifies the region for the resource. @@ -142,7 +142,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } - /** The stage of the BatchDeploymentData definition allowing to specify parent resource. */ + /** The stage of the BatchDeployment definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, endpointName. @@ -155,7 +155,7 @@ interface WithParentResource { WithProperties withExistingBatchEndpoint( String resourceGroupName, String workspaceName, String endpointName); } - /** The stage of the BatchDeploymentData definition allowing to specify properties. */ + /** The stage of the BatchDeployment definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -163,10 +163,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(BatchDeploymentDetails properties); + WithCreate withProperties(BatchDeploymentProperties properties); } /** - * The stage of the BatchDeploymentData definition which contains all the minimum required properties for the + * 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 @@ -179,7 +179,7 @@ interface WithCreate * * @return the created resource. */ - BatchDeploymentData create(); + BatchDeployment create(); /** * Executes the create request. @@ -187,9 +187,9 @@ interface WithCreate * @param context The context to associate with this operation. * @return the created resource. */ - BatchDeploymentData create(Context context); + BatchDeployment create(Context context); } - /** The stage of the BatchDeploymentData definition allowing to specify tags. */ + /** The stage of the BatchDeployment definition allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -199,7 +199,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the BatchDeploymentData definition allowing to specify identity. */ + /** 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 @@ -210,7 +210,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the BatchDeploymentData definition allowing to specify kind. */ + /** 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 @@ -222,7 +222,7 @@ interface WithKind { */ WithCreate withKind(String kind); } - /** The stage of the BatchDeploymentData definition allowing to specify sku. */ + /** The stage of the BatchDeployment definition allowing to specify sku. */ interface WithSku { /** * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. @@ -234,25 +234,20 @@ interface WithSku { } } /** - * Begins update for the BatchDeploymentData resource. + * Begins update for the BatchDeployment resource. * * @return the stage of resource update. */ - BatchDeploymentData.Update update(); + BatchDeployment.Update update(); - /** The template for BatchDeploymentData update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithKind, - UpdateStages.WithProperties, - UpdateStages.WithSku { + /** The template for BatchDeployment update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - BatchDeploymentData apply(); + BatchDeployment apply(); /** * Executes the update request. @@ -260,11 +255,11 @@ interface Update * @param context The context to associate with this operation. * @return the updated resource. */ - BatchDeploymentData apply(Context context); + BatchDeployment apply(Context context); } - /** The BatchDeploymentData update stages. */ + /** The BatchDeployment update stages. */ interface UpdateStages { - /** The stage of the BatchDeploymentData update allowing to specify tags. */ + /** The stage of the BatchDeployment update allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -274,30 +269,7 @@ interface WithTags { */ Update withTags(Map tags); } - /** The stage of the BatchDeploymentData update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - Update withIdentity(PartialManagedServiceIdentity identity); - } - /** The stage of the BatchDeploymentData update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - Update withKind(String kind); - } - /** The stage of the BatchDeploymentData update allowing to specify properties. */ + /** The stage of the BatchDeployment update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: Additional attributes of the entity.. @@ -307,23 +279,13 @@ interface WithProperties { */ Update withProperties(PartialBatchDeployment properties); } - /** The stage of the BatchDeploymentData update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - Update withSku(PartialSku sku); - } } /** * Refreshes the resource to sync with Azure. * * @return the refreshed resource. */ - BatchDeploymentData refresh(); + BatchDeployment refresh(); /** * Refreshes the resource to sync with Azure. @@ -331,5 +293,5 @@ interface WithSku { * @param context The context to associate with this operation. * @return the refreshed resource. */ - BatchDeploymentData refresh(Context context); + BatchDeployment refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java similarity index 80% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java index 210a7bc11f9de..e77dbadc204ec 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java @@ -10,7 +10,7 @@ /** Batch inference settings per deployment. */ @Fluent -public final class BatchDeploymentDetails extends EndpointDeploymentPropertiesBase { +public final class BatchDeploymentProperties extends EndpointDeploymentPropertiesBase { /* * Compute target for batch inference operation. */ @@ -18,13 +18,11 @@ public final class BatchDeploymentDetails extends EndpointDeploymentPropertiesBa private String compute; /* - * Error threshold, if the error count for the entire input goes above this - * value, + * 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. + * If set to -1 (the lower bound), all failures during batch inference will be ignored. */ @JsonProperty(value = "errorThreshold") private Integer errorThreshold; @@ -44,8 +42,7 @@ public final class BatchDeploymentDetails extends EndpointDeploymentPropertiesBa /* * 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. + * For TabularDataset, this is the size of the records in bytes, per mini-batch. */ @JsonProperty(value = "miniBatchSize") private Long miniBatchSize; @@ -76,16 +73,14 @@ public final class BatchDeploymentDetails extends EndpointDeploymentPropertiesBa /* * Indicates compute configuration for the job. - * If not provided, will default to the defaults defined in - * ResourceConfiguration. + * If not provided, will default to the defaults defined in ResourceConfiguration. */ @JsonProperty(value = "resources") - private ResourceConfiguration resources; + private DeploymentResourceConfiguration resources; /* * Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in - * BatchRetrySettings. + * If not provided, will default to the defaults defined in BatchRetrySettings. */ @JsonProperty(value = "retrySettings") private BatchRetrySettings retrySettings; @@ -103,9 +98,9 @@ public String compute() { * Set the compute property: Compute target for batch inference operation. * * @param compute the compute value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withCompute(String compute) { + public BatchDeploymentProperties withCompute(String compute) { this.compute = compute; return this; } @@ -129,9 +124,9 @@ public Integer errorThreshold() { * all failures during batch inference will be ignored. * * @param errorThreshold the errorThreshold value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withErrorThreshold(Integer errorThreshold) { + public BatchDeploymentProperties withErrorThreshold(Integer errorThreshold) { this.errorThreshold = errorThreshold; return this; } @@ -149,9 +144,9 @@ public BatchLoggingLevel loggingLevel() { * Set the loggingLevel property: Logging level for batch inference operation. * * @param loggingLevel the loggingLevel value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withLoggingLevel(BatchLoggingLevel loggingLevel) { + public BatchDeploymentProperties withLoggingLevel(BatchLoggingLevel loggingLevel) { this.loggingLevel = loggingLevel; return this; } @@ -169,9 +164,9 @@ public Integer maxConcurrencyPerInstance() { * Set the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. * * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { + public BatchDeploymentProperties withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; return this; } @@ -191,9 +186,9 @@ public Long miniBatchSize() { * the number of files per mini-batch. For TabularDataset, this is the size of the records in bytes, per mini-batch. * * @param miniBatchSize the miniBatchSize value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withMiniBatchSize(Long miniBatchSize) { + public BatchDeploymentProperties withMiniBatchSize(Long miniBatchSize) { this.miniBatchSize = miniBatchSize; return this; } @@ -211,9 +206,9 @@ public AssetReferenceBase model() { * Set the model property: Reference to the model asset for the endpoint deployment. * * @param model the model value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withModel(AssetReferenceBase model) { + public BatchDeploymentProperties withModel(AssetReferenceBase model) { this.model = model; return this; } @@ -231,9 +226,9 @@ public BatchOutputAction outputAction() { * Set the outputAction property: Indicates how the output will be organized. * * @param outputAction the outputAction value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withOutputAction(BatchOutputAction outputAction) { + public BatchDeploymentProperties withOutputAction(BatchOutputAction outputAction) { this.outputAction = outputAction; return this; } @@ -251,9 +246,9 @@ public String outputFileName() { * Set the outputFileName property: Customized output file name for append_row output action. * * @param outputFileName the outputFileName value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withOutputFileName(String outputFileName) { + public BatchDeploymentProperties withOutputFileName(String outputFileName) { this.outputFileName = outputFileName; return this; } @@ -273,7 +268,7 @@ public DeploymentProvisioningState provisioningState() { * * @return the resources value. */ - public ResourceConfiguration resources() { + public DeploymentResourceConfiguration resources() { return this.resources; } @@ -282,9 +277,9 @@ public ResourceConfiguration resources() { * defaults defined in ResourceConfiguration. * * @param resources the resources value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withResources(ResourceConfiguration resources) { + public BatchDeploymentProperties withResources(DeploymentResourceConfiguration resources) { this.resources = resources; return this; } @@ -304,44 +299,44 @@ public BatchRetrySettings retrySettings() { * to the defaults defined in BatchRetrySettings. * * @param retrySettings the retrySettings value to set. - * @return the BatchDeploymentDetails object itself. + * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentDetails withRetrySettings(BatchRetrySettings retrySettings) { + public BatchDeploymentProperties withRetrySettings(BatchRetrySettings retrySettings) { this.retrySettings = retrySettings; return this; } /** {@inheritDoc} */ @Override - public BatchDeploymentDetails withCodeConfiguration(CodeConfiguration codeConfiguration) { + public BatchDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { super.withCodeConfiguration(codeConfiguration); return this; } /** {@inheritDoc} */ @Override - public BatchDeploymentDetails withDescription(String description) { + public BatchDeploymentProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public BatchDeploymentDetails withEnvironmentId(String environmentId) { + public BatchDeploymentProperties withEnvironmentId(String environmentId) { super.withEnvironmentId(environmentId); return this; } /** {@inheritDoc} */ @Override - public BatchDeploymentDetails withEnvironmentVariables(Map environmentVariables) { + public BatchDeploymentProperties withEnvironmentVariables(Map environmentVariables) { super.withEnvironmentVariables(environmentVariables); return this; } /** {@inheritDoc} */ @Override - public BatchDeploymentDetails withProperties(Map properties) { + public BatchDeploymentProperties withProperties(Map properties) { super.withProperties(properties); return this; } 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 index 9f22d39168a3b..b6a71a5ea6d10 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class BatchDeploymentTrackedResourceArmPaginatedResult { /* - * The link to the next page of BatchDeployment objects. If null, there are - * no additional pages. + * The link to the next page of BatchDeployment objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class BatchDeploymentTrackedResourceArmPaginatedResult { * An array of objects of type BatchDeployment. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional @@ -52,7 +51,7 @@ public BatchDeploymentTrackedResourceArmPaginatedResult withNextLink(String next * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. */ - public BatchDeploymentTrackedResourceArmPaginatedResult withValue(List value) { + public BatchDeploymentTrackedResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index be41a52144294..3002176d89c23 100644 --- 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 @@ -21,7 +21,7 @@ public interface BatchDeployments { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); /** * Lists Batch inference deployments in the workspace. @@ -38,7 +38,7 @@ public interface BatchDeployments { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String endpointName, @@ -87,7 +87,7 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a batch inference deployment by id. */ - BatchDeploymentData get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** * Gets a batch inference deployment by id. @@ -102,7 +102,7 @@ void delete( * @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( + Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); /** @@ -114,7 +114,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a batch inference deployment by id along with {@link Response}. */ - BatchDeploymentData getById(String id); + BatchDeployment getById(String id); /** * Gets a batch inference deployment by id. @@ -126,7 +126,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete Batch Inference deployment (asynchronous). @@ -150,10 +150,10 @@ Response getWithResponse( void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new BatchDeploymentData resource. + * Begins definition for a new BatchDeployment resource. * * @param name resource name. - * @return the first stage of the new BatchDeploymentData definition. + * @return the first stage of the new BatchDeployment definition. */ - BatchDeploymentData.DefinitionStages.Blank define(String name); + BatchDeployment.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java similarity index 71% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java index 08a9d25e30954..e7d017d86e8b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java @@ -7,11 +7,11 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; import java.util.Map; -/** An immutable client-side representation of BatchEndpointData. */ -public interface BatchEndpointData { +/** An immutable client-side representation of BatchEndpoint. */ +public interface BatchEndpoint { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -67,7 +67,7 @@ public interface BatchEndpointData { * * @return the properties value. */ - BatchEndpointDetails properties(); + BatchEndpointProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -98,13 +98,13 @@ public interface BatchEndpointData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner object. * * @return the inner object. */ - BatchEndpointDataInner innerModel(); + BatchEndpointInner innerModel(); - /** The entirety of the BatchEndpointData definition. */ + /** The entirety of the BatchEndpoint definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, @@ -112,12 +112,12 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The BatchEndpointData definition stages. */ + /** The BatchEndpoint definition stages. */ interface DefinitionStages { - /** The first stage of the BatchEndpointData definition. */ + /** The first stage of the BatchEndpoint definition. */ interface Blank extends WithLocation { } - /** The stage of the BatchEndpointData definition allowing to specify location. */ + /** The stage of the BatchEndpoint definition allowing to specify location. */ interface WithLocation { /** * Specifies the region for the resource. @@ -135,7 +135,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } - /** The stage of the BatchEndpointData definition allowing to specify parent resource. */ + /** The stage of the BatchEndpoint definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -146,7 +146,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the BatchEndpointData definition allowing to specify properties. */ + /** The stage of the BatchEndpoint definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -154,11 +154,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(BatchEndpointDetails properties); + WithCreate withProperties(BatchEndpointProperties properties); } /** - * The stage of the BatchEndpointData definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * 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, @@ -170,7 +170,7 @@ interface WithCreate * * @return the created resource. */ - BatchEndpointData create(); + BatchEndpoint create(); /** * Executes the create request. @@ -178,9 +178,9 @@ interface WithCreate * @param context The context to associate with this operation. * @return the created resource. */ - BatchEndpointData create(Context context); + BatchEndpoint create(Context context); } - /** The stage of the BatchEndpointData definition allowing to specify tags. */ + /** The stage of the BatchEndpoint definition allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -190,7 +190,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the BatchEndpointData definition allowing to specify identity. */ + /** 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 @@ -201,7 +201,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the BatchEndpointData definition allowing to specify kind. */ + /** 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 @@ -213,7 +213,7 @@ interface WithKind { */ WithCreate withKind(String kind); } - /** The stage of the BatchEndpointData definition allowing to specify sku. */ + /** The stage of the BatchEndpoint definition allowing to specify sku. */ interface WithSku { /** * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. @@ -225,25 +225,20 @@ interface WithSku { } } /** - * Begins update for the BatchEndpointData resource. + * Begins update for the BatchEndpoint resource. * * @return the stage of resource update. */ - BatchEndpointData.Update update(); + BatchEndpoint.Update update(); - /** The template for BatchEndpointData update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithKind, - UpdateStages.WithProperties, - UpdateStages.WithSku { + /** The template for BatchEndpoint update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { /** * Executes the update request. * * @return the updated resource. */ - BatchEndpointData apply(); + BatchEndpoint apply(); /** * Executes the update request. @@ -251,11 +246,11 @@ interface Update * @param context The context to associate with this operation. * @return the updated resource. */ - BatchEndpointData apply(Context context); + BatchEndpoint apply(Context context); } - /** The BatchEndpointData update stages. */ + /** The BatchEndpoint update stages. */ interface UpdateStages { - /** The stage of the BatchEndpointData update allowing to specify tags. */ + /** The stage of the BatchEndpoint update allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -265,7 +260,7 @@ interface WithTags { */ Update withTags(Map tags); } - /** The stage of the BatchEndpointData update allowing to specify identity. */ + /** 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 @@ -276,45 +271,13 @@ interface WithIdentity { */ Update withIdentity(PartialManagedServiceIdentity identity); } - /** The stage of the BatchEndpointData update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - Update withKind(String kind); - } - /** The stage of the BatchEndpointData update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Additional attributes of the entity.. - * - * @param properties Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(PartialBatchEndpoint properties); - } - /** The stage of the BatchEndpointData update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - Update withSku(PartialSku sku); - } } /** * Refreshes the resource to sync with Azure. * * @return the refreshed resource. */ - BatchEndpointData refresh(); + BatchEndpoint refresh(); /** * Refreshes the resource to sync with Azure. @@ -322,7 +285,7 @@ interface WithSku { * @param context The context to associate with this operation. * @return the refreshed resource. */ - BatchEndpointData refresh(Context context); + BatchEndpoint refresh(Context context); /** * Lists batch Inference Endpoint keys. 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 index 21209aca29dd4..4a19a76ee1722 100644 --- 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 @@ -12,8 +12,7 @@ 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. + * This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. */ @JsonProperty(value = "deploymentName") private String deploymentName; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java similarity index 81% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java index f92ee169cc380..c94526368b7aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java @@ -12,7 +12,7 @@ /** Batch endpoint configuration. */ @Fluent -public final class BatchEndpointDetails extends EndpointPropertiesBaseInner { +public final class BatchEndpointProperties extends EndpointPropertiesBaseInner { /* * Default values for Batch Endpoint */ @@ -38,9 +38,9 @@ public BatchEndpointDefaults defaults() { * Set the defaults property: Default values for Batch Endpoint. * * @param defaults the defaults value to set. - * @return the BatchEndpointDetails object itself. + * @return the BatchEndpointProperties object itself. */ - public BatchEndpointDetails withDefaults(BatchEndpointDefaults defaults) { + public BatchEndpointProperties withDefaults(BatchEndpointDefaults defaults) { this.defaults = defaults; return this; } @@ -56,28 +56,28 @@ public EndpointProvisioningState provisioningState() { /** {@inheritDoc} */ @Override - public BatchEndpointDetails withAuthMode(EndpointAuthMode authMode) { + public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { super.withAuthMode(authMode); return this; } /** {@inheritDoc} */ @Override - public BatchEndpointDetails withDescription(String description) { + public BatchEndpointProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public BatchEndpointDetails withKeys(EndpointAuthKeysInner keys) { + public BatchEndpointProperties withKeys(EndpointAuthKeysInner keys) { super.withKeys(keys); return this; } /** {@inheritDoc} */ @Override - public BatchEndpointDetails withProperties(Map properties) { + public BatchEndpointProperties withProperties(Map properties) { super.withProperties(properties); return this; } 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 index 17a0ff64a08ae..2e6a13a83ad5c 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class BatchEndpointTrackedResourceArmPaginatedResult { /* - * The link to the next page of BatchEndpoint objects. If null, there are - * no additional pages. + * The link to the next page of BatchEndpoint objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class BatchEndpointTrackedResourceArmPaginatedResult { * An array of objects of type BatchEndpoint. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional @@ -52,7 +51,7 @@ public BatchEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLi * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. */ - public BatchEndpointTrackedResourceArmPaginatedResult withValue(List value) { + public BatchEndpointTrackedResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 8e4c962dbe785..3c1729b22a47b 100644 --- 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 @@ -20,7 +20,7 @@ public interface BatchEndpoints { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * Lists Batch inference endpoint in the workspace. @@ -35,7 +35,7 @@ public interface BatchEndpoints { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, Integer count, String skip, Context context); /** @@ -74,7 +74,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a batch inference endpoint by name. */ - BatchEndpointData get(String resourceGroupName, String workspaceName, String endpointName); + BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName); /** * Gets a batch inference endpoint by name. @@ -88,7 +88,7 @@ PagedIterable list( * @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( + Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context); /** @@ -128,7 +128,7 @@ Response listKeysWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a batch inference endpoint by name along with {@link Response}. */ - BatchEndpointData getById(String id); + BatchEndpoint getById(String id); /** * Gets a batch inference endpoint by name. @@ -140,7 +140,7 @@ Response listKeysWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete Batch Inference Endpoint (asynchronous). @@ -164,10 +164,10 @@ Response listKeysWithResponse( void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new BatchEndpointData resource. + * Begins definition for a new BatchEndpoint resource. * * @param name resource name. - * @return the first stage of the new BatchEndpointData definition. + * @return the first stage of the new BatchEndpoint definition. */ - BatchEndpointData.DefinitionStages.Blank define(String name); + BatchEndpoint.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java new file mode 100644 index 0000000000000..27360a9645f70 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 BindOptions model. */ +@Fluent +public final class BindOptions { + /* + * Type of Bind Option + */ + @JsonProperty(value = "propagation") + private String propagation; + + /* + * Indicate whether to create host path. + */ + @JsonProperty(value = "createHostPath") + private Boolean createHostPath; + + /* + * Mention the selinux options. + */ + @JsonProperty(value = "selinux") + private String selinux; + + /** + * Get the propagation property: Type of Bind Option. + * + * @return the propagation value. + */ + public String propagation() { + return this.propagation; + } + + /** + * Set the propagation property: Type of Bind Option. + * + * @param propagation the propagation value to set. + * @return the BindOptions object itself. + */ + public BindOptions withPropagation(String propagation) { + this.propagation = propagation; + return this; + } + + /** + * Get the createHostPath property: Indicate whether to create host path. + * + * @return the createHostPath value. + */ + public Boolean createHostPath() { + return this.createHostPath; + } + + /** + * Set the createHostPath property: Indicate whether to create host path. + * + * @param createHostPath the createHostPath value to set. + * @return the BindOptions object itself. + */ + public BindOptions withCreateHostPath(Boolean createHostPath) { + this.createHostPath = createHostPath; + return this; + } + + /** + * Get the selinux property: Mention the selinux options. + * + * @return the selinux value. + */ + public String selinux() { + return this.selinux; + } + + /** + * Set the selinux property: Mention the selinux options. + * + * @param selinux the selinux value to set. + * @return the BindOptions object itself. + */ + public BindOptions withSelinux(String selinux) { + this.selinux = selinux; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 0000000000000..72ea31468552f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 BlockedTransformers. */ +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 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 index 480d894d34337..149be7d85b2d1 100644 --- 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 @@ -12,12 +12,9 @@ @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. - * + * [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; 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 index 444af27aa8ca2..cbbb34dca26eb 100644 --- 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 @@ -16,16 +16,10 @@ @Fluent public final class Classification extends AutoMLVertical { /* - * Allowed models for classification task. + * Positive label for binary metrics calculation. */ - @JsonProperty(value = "allowedModels") - private List allowedModels; - - /* - * Blocked models for classification task. - */ - @JsonProperty(value = "blockedModels") - private List blockedModels; + @JsonProperty(value = "positiveLabel") + private String positiveLabel; /* * Primary metric for the task. @@ -34,10 +28,16 @@ public final class Classification extends AutoMLVertical { private ClassificationPrimaryMetrics primaryMetric; /* - * Data inputs for AutoMLJob. + * Inputs for training phase for an AutoML Job. */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; + @JsonProperty(value = "trainingSettings") + private ClassificationTrainingSettings trainingSettings; + + /* + * Columns to use for CVSplit data. + */ + @JsonProperty(value = "cvSplitColumnNames") + private List cvSplitColumnNames; /* * Featurization inputs needed for AutoML job. @@ -52,48 +52,64 @@ public final class Classification extends AutoMLVertical { private TableVerticalLimitSettings limitSettings; /* - * Inputs for training phase for an AutoML Job. + * Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. */ - @JsonProperty(value = "trainingSettings") - private TrainingSettings trainingSettings; + @JsonProperty(value = "nCrossValidations") + private NCrossValidations nCrossValidations; - /** - * Get the allowedModels property: Allowed models for classification task. - * - * @return the allowedModels value. + /* + * Test data input. */ - public List allowedModels() { - return this.allowedModels; - } + @JsonProperty(value = "testData") + private MLTableJobInput testData; - /** - * Set the allowedModels property: Allowed models for classification task. - * - * @param allowedModels the allowedModels value to set. - * @return the Classification object itself. + /* + * 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. */ - public Classification withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } + @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; /** - * Get the blockedModels property: Blocked models for classification task. + * Get the positiveLabel property: Positive label for binary metrics calculation. * - * @return the blockedModels value. + * @return the positiveLabel value. */ - public List blockedModels() { - return this.blockedModels; + public String positiveLabel() { + return this.positiveLabel; } /** - * Set the blockedModels property: Blocked models for classification task. + * Set the positiveLabel property: Positive label for binary metrics calculation. * - * @param blockedModels the blockedModels value to set. + * @param positiveLabel the positiveLabel value to set. * @return the Classification object itself. */ - public Classification withBlockedModels(List blockedModels) { - this.blockedModels = blockedModels; + public Classification withPositiveLabel(String positiveLabel) { + this.positiveLabel = positiveLabel; return this; } @@ -118,22 +134,42 @@ public Classification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetr } /** - * Get the dataSettings property: Data inputs for AutoMLJob. + * Get the trainingSettings property: Inputs for training phase for an AutoML Job. * - * @return the dataSettings value. + * @return the trainingSettings value. */ - public TableVerticalDataSettings dataSettings() { - return this.dataSettings; + public ClassificationTrainingSettings trainingSettings() { + return this.trainingSettings; } /** - * Set the dataSettings property: Data inputs for AutoMLJob. + * Set the trainingSettings property: Inputs for training phase for an AutoML Job. * - * @param dataSettings the dataSettings value to set. + * @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 withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; + public Classification withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; return this; } @@ -178,22 +214,130 @@ public Classification withLimitSettings(TableVerticalLimitSettings limitSettings } /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when + * validation dataset is not provided. * - * @return the trainingSettings value. + * @return the nCrossValidations value. */ - public TrainingSettings trainingSettings() { - return this.trainingSettings; + public NCrossValidations nCrossValidations() { + return this.nCrossValidations; } /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when + * validation dataset is not provided. * - * @param trainingSettings the trainingSettings value to set. + * @param nCrossValidations the nCrossValidations value to set. * @return the Classification object itself. */ - public Classification withTrainingSettings(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; + 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; } @@ -204,6 +348,20 @@ public Classification withLogVerbosity(LogVerbosity 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. * @@ -212,8 +370,8 @@ public Classification withLogVerbosity(LogVerbosity logVerbosity) { @Override public void validate() { super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); + if (trainingSettings() != null) { + trainingSettings().validate(); } if (featurizationSettings() != null) { featurizationSettings().validate(); @@ -221,8 +379,14 @@ public void validate() { if (limitSettings() != null) { limitSettings().validate(); } - if (trainingSettings() != null) { - trainingSettings().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/ClassificationTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java new file mode 100644 index 0000000000000..c447b968c8a27 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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/CocoExportSummary.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CocoExportSummary.java new file mode 100644 index 0000000000000..f885a7f09fbcb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CocoExportSummary.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The CocoExportSummary model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("Coco") +@Immutable +public final class CocoExportSummary extends ExportSummaryInner { + /* + * The container name to which the labels will be exported. + */ + @JsonProperty(value = "containerName", access = JsonProperty.Access.WRITE_ONLY) + private String containerName; + + /* + * The output path where the labels will be exported. + */ + @JsonProperty(value = "snapshotPath", access = JsonProperty.Access.WRITE_ONLY) + private String snapshotPath; + + /** + * Get the containerName property: The container name to which the labels will be exported. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Get the snapshotPath property: The output path where the labels will be exported. + * + * @return the snapshotPath value. + */ + public String snapshotPath() { + return this.snapshotPath; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java similarity index 70% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java index 348d61274d194..3d41404e0fc47 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -/** An immutable client-side representation of ComponentContainerData. */ -public interface ComponentContainerData { +/** An immutable client-side representation of CodeContainer. */ +public interface CodeContainer { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface ComponentContainerData { * * @return the properties value. */ - ComponentContainerDetails properties(); + CodeContainerProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface ComponentContainerData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner object. * * @return the inner object. */ - ComponentContainerDataInner innerModel(); + CodeContainerInner innerModel(); - /** The entirety of the ComponentContainerData definition. */ + /** The entirety of the CodeContainer definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ComponentContainerData definition stages. */ + /** The CodeContainer definition stages. */ interface DefinitionStages { - /** The first stage of the ComponentContainerData definition. */ + /** The first stage of the CodeContainer definition. */ interface Blank extends WithParentResource { } - /** The stage of the ComponentContainerData definition allowing to specify parent resource. */ + /** The stage of the CodeContainer definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -82,7 +82,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the ComponentContainerData definition allowing to specify properties. */ + /** The stage of the CodeContainer definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -90,11 +90,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(ComponentContainerDetails properties); + WithCreate withProperties(CodeContainerProperties properties); } /** - * The stage of the ComponentContainerData definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * 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 { /** @@ -102,7 +102,7 @@ interface WithCreate { * * @return the created resource. */ - ComponentContainerData create(); + CodeContainer create(); /** * Executes the create request. @@ -110,24 +110,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - ComponentContainerData create(Context context); + CodeContainer create(Context context); } } /** - * Begins update for the ComponentContainerData resource. + * Begins update for the CodeContainer resource. * * @return the stage of resource update. */ - ComponentContainerData.Update update(); + CodeContainer.Update update(); - /** The template for ComponentContainerData update. */ + /** The template for CodeContainer update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - ComponentContainerData apply(); + CodeContainer apply(); /** * Executes the update request. @@ -135,11 +135,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - ComponentContainerData apply(Context context); + CodeContainer apply(Context context); } - /** The ComponentContainerData update stages. */ + /** The CodeContainer update stages. */ interface UpdateStages { - /** The stage of the ComponentContainerData update allowing to specify properties. */ + /** The stage of the CodeContainer update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -147,7 +147,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(ComponentContainerDetails properties); + Update withProperties(CodeContainerProperties properties); } } /** @@ -155,7 +155,7 @@ interface WithProperties { * * @return the refreshed resource. */ - ComponentContainerData refresh(); + CodeContainer refresh(); /** * Refreshes the resource to sync with Azure. @@ -163,5 +163,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - ComponentContainerData refresh(Context context); + CodeContainer refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java index 76f0d72d1f46e..1a58656d01d0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java @@ -9,31 +9,31 @@ /** Container for code asset versions. */ @Fluent -public final class CodeContainerDetails extends AssetContainer { +public final class CodeContainerProperties extends AssetContainer { /** {@inheritDoc} */ @Override - public CodeContainerDetails withIsArchived(Boolean isArchived) { + public CodeContainerProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public CodeContainerDetails withDescription(String description) { + public CodeContainerProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public CodeContainerDetails withProperties(Map properties) { + public CodeContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public CodeContainerDetails withTags(Map tags) { + public CodeContainerProperties withTags(Map tags) { super.withTags(tags); return this; } 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 index 083dc6e2162d8..e01333f918959 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class CodeContainerResourceArmPaginatedResult { /* - * The link to the next page of CodeContainer objects. If null, there are - * no additional pages. + * The link to the next page of CodeContainer objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class CodeContainerResourceArmPaginatedResult { * An array of objects of type CodeContainer. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional @@ -52,7 +51,7 @@ public CodeContainerResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the CodeContainerResourceArmPaginatedResult object itself. */ - public CodeContainerResourceArmPaginatedResult withValue(List value) { + public CodeContainerResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 28853ffc3b5f9..ada2acb29bc34 100644 --- 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 @@ -20,7 +20,7 @@ public interface CodeContainers { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List containers. @@ -34,7 +34,7 @@ public interface CodeContainers { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Context context); /** * Delete container. @@ -73,7 +73,7 @@ public interface CodeContainers { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container. */ - CodeContainerData get(String resourceGroupName, String workspaceName, String name); + CodeContainer get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -87,7 +87,7 @@ public interface CodeContainers { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -99,7 +99,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - CodeContainerData getById(String id); + CodeContainer getById(String id); /** * Get container. @@ -111,7 +111,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete container. @@ -136,10 +136,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new CodeContainerData resource. + * Begins definition for a new CodeContainer resource. * * @param name resource name. - * @return the first stage of the new CodeContainerData definition. + * @return the first stage of the new CodeContainer definition. */ - CodeContainerData.DefinitionStages.Blank define(String name); + CodeContainer.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java similarity index 73% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java index b58a352255468..74b92c620c7c1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -/** An immutable client-side representation of CodeVersionData. */ -public interface CodeVersionData { +/** An immutable client-side representation of CodeVersion. */ +public interface CodeVersion { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface CodeVersionData { * * @return the properties value. */ - CodeVersionDetails properties(); + CodeVersionProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface CodeVersionData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner object. * * @return the inner object. */ - CodeVersionDataInner innerModel(); + CodeVersionInner innerModel(); - /** The entirety of the CodeVersionData definition. */ + /** The entirety of the CodeVersion definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The CodeVersionData definition stages. */ + /** The CodeVersion definition stages. */ interface DefinitionStages { - /** The first stage of the CodeVersionData definition. */ + /** The first stage of the CodeVersion definition. */ interface Blank extends WithParentResource { } - /** The stage of the CodeVersionData definition allowing to specify parent resource. */ + /** The stage of the CodeVersion definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, name. @@ -83,7 +83,7 @@ interface WithParentResource { */ WithProperties withExistingCode(String resourceGroupName, String workspaceName, String name); } - /** The stage of the CodeVersionData definition allowing to specify properties. */ + /** The stage of the CodeVersion definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -91,11 +91,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(CodeVersionDetails properties); + WithCreate withProperties(CodeVersionProperties properties); } /** - * The stage of the CodeVersionData definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * 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 { /** @@ -103,7 +103,7 @@ interface WithCreate { * * @return the created resource. */ - CodeVersionData create(); + CodeVersion create(); /** * Executes the create request. @@ -111,24 +111,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - CodeVersionData create(Context context); + CodeVersion create(Context context); } } /** - * Begins update for the CodeVersionData resource. + * Begins update for the CodeVersion resource. * * @return the stage of resource update. */ - CodeVersionData.Update update(); + CodeVersion.Update update(); - /** The template for CodeVersionData update. */ + /** The template for CodeVersion update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - CodeVersionData apply(); + CodeVersion apply(); /** * Executes the update request. @@ -136,11 +136,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - CodeVersionData apply(Context context); + CodeVersion apply(Context context); } - /** The CodeVersionData update stages. */ + /** The CodeVersion update stages. */ interface UpdateStages { - /** The stage of the CodeVersionData update allowing to specify properties. */ + /** The stage of the CodeVersion update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -148,7 +148,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(CodeVersionDetails properties); + Update withProperties(CodeVersionProperties properties); } } /** @@ -156,7 +156,7 @@ interface WithProperties { * * @return the refreshed resource. */ - CodeVersionData refresh(); + CodeVersion refresh(); /** * Refreshes the resource to sync with Azure. @@ -164,5 +164,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - CodeVersionData refresh(Context context); + CodeVersion refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java index fe0770db7deef..e6398fd6244e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java @@ -10,7 +10,7 @@ /** Code asset version details. */ @Fluent -public final class CodeVersionDetails extends AssetBase { +public final class CodeVersionProperties extends AssetBase { /* * Uri where code is located */ @@ -30,44 +30,44 @@ public String codeUri() { * Set the codeUri property: Uri where code is located. * * @param codeUri the codeUri value to set. - * @return the CodeVersionDetails object itself. + * @return the CodeVersionProperties object itself. */ - public CodeVersionDetails withCodeUri(String codeUri) { + public CodeVersionProperties withCodeUri(String codeUri) { this.codeUri = codeUri; return this; } /** {@inheritDoc} */ @Override - public CodeVersionDetails withIsAnonymous(Boolean isAnonymous) { + public CodeVersionProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } /** {@inheritDoc} */ @Override - public CodeVersionDetails withIsArchived(Boolean isArchived) { + public CodeVersionProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public CodeVersionDetails withDescription(String description) { + public CodeVersionProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public CodeVersionDetails withProperties(Map properties) { + public CodeVersionProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public CodeVersionDetails withTags(Map tags) { + public CodeVersionProperties withTags(Map tags) { super.withTags(tags); return this; } 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 index 9b0d2f605dd27..968079efcde1e 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class CodeVersionResourceArmPaginatedResult { /* - * The link to the next page of CodeVersion objects. If null, there are no - * additional pages. + * The link to the next page of CodeVersion objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class CodeVersionResourceArmPaginatedResult { * An array of objects of type CodeVersion. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional @@ -52,7 +51,7 @@ public CodeVersionResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the CodeVersionResourceArmPaginatedResult object itself. */ - public CodeVersionResourceArmPaginatedResult withValue(List value) { + public CodeVersionResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 3555605058013..834a2419f111c 100644 --- 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 @@ -21,7 +21,7 @@ public interface CodeVersions { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List versions. @@ -38,7 +38,7 @@ public interface CodeVersions { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -88,7 +88,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version. */ - CodeVersionData get(String resourceGroupName, String workspaceName, String name, String version); + CodeVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -103,7 +103,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -115,7 +115,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - CodeVersionData getById(String id); + CodeVersion getById(String id); /** * Get version. @@ -127,7 +127,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete version. @@ -152,10 +152,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new CodeVersionData resource. + * Begins definition for a new CodeVersion resource. * * @param name resource name. - * @return the first stage of the new CodeVersionData definition. + * @return the first stage of the new CodeVersion definition. */ - CodeVersionData.DefinitionStages.Blank define(String name); + CodeVersion.DefinitionStages.Blank define(String name); } 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 index 5c42daaa81e7a..4eb0b18fdae5f 100644 --- 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 @@ -16,7 +16,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("Command") @Fluent -public final class CommandJob extends JobBaseDetails { +public final class CommandJob extends JobBaseProperties { /* * ARM resource ID of the code asset. */ @@ -24,22 +24,19 @@ public final class CommandJob extends JobBaseDetails { private String codeId; /* - * [Required] The command to execute on startup of the job. eg. "python - * train.py" + * [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. + * 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. + * [Required] The ARM resource ID of the Environment specification for the job. */ @JsonProperty(value = "environmentId", required = true) private String environmentId; @@ -81,7 +78,7 @@ public final class CommandJob extends JobBaseDetails { * Compute Resource configuration for the job. */ @JsonProperty(value = "resources") - private ResourceConfiguration resources; + private JobResourceConfiguration resources; /** * Get the codeId property: ARM resource ID of the code asset. @@ -259,7 +256,7 @@ public Object parameters() { * * @return the resources value. */ - public ResourceConfiguration resources() { + public JobResourceConfiguration resources() { return this.resources; } @@ -269,11 +266,18 @@ public ResourceConfiguration resources() { * @param resources the resources value to set. * @return the CommandJob object itself. */ - public CommandJob withResources(ResourceConfiguration resources) { + 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) { @@ -309,13 +313,6 @@ public CommandJob withIsArchived(Boolean isArchived) { return this; } - /** {@inheritDoc} */ - @Override - public CommandJob withSchedule(ScheduleBase schedule) { - super.withSchedule(schedule); - return this; - } - /** {@inheritDoc} */ @Override public CommandJob withServices(Map services) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java similarity index 75% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java index abc45b75dc2c4..2db458e03fb13 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -/** An immutable client-side representation of ModelContainerData. */ -public interface ModelContainerData { +/** An immutable client-side representation of ComponentContainer. */ +public interface ComponentContainer { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface ModelContainerData { * * @return the properties value. */ - ModelContainerDetails properties(); + ComponentContainerProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface ModelContainerData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner object. * * @return the inner object. */ - ModelContainerDataInner innerModel(); + ComponentContainerInner innerModel(); - /** The entirety of the ModelContainerData definition. */ + /** The entirety of the ComponentContainer definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ModelContainerData definition stages. */ + /** The ComponentContainer definition stages. */ interface DefinitionStages { - /** The first stage of the ModelContainerData definition. */ + /** The first stage of the ComponentContainer definition. */ interface Blank extends WithParentResource { } - /** The stage of the ModelContainerData definition allowing to specify parent resource. */ + /** The stage of the ComponentContainer definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -82,7 +82,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the ModelContainerData definition allowing to specify properties. */ + /** The stage of the ComponentContainer definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -90,10 +90,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(ModelContainerDetails properties); + WithCreate withProperties(ComponentContainerProperties properties); } /** - * The stage of the ModelContainerData definition which contains all the minimum required properties for the + * 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 { @@ -102,7 +102,7 @@ interface WithCreate { * * @return the created resource. */ - ModelContainerData create(); + ComponentContainer create(); /** * Executes the create request. @@ -110,24 +110,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - ModelContainerData create(Context context); + ComponentContainer create(Context context); } } /** - * Begins update for the ModelContainerData resource. + * Begins update for the ComponentContainer resource. * * @return the stage of resource update. */ - ModelContainerData.Update update(); + ComponentContainer.Update update(); - /** The template for ModelContainerData update. */ + /** The template for ComponentContainer update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - ModelContainerData apply(); + ComponentContainer apply(); /** * Executes the update request. @@ -135,11 +135,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - ModelContainerData apply(Context context); + ComponentContainer apply(Context context); } - /** The ModelContainerData update stages. */ + /** The ComponentContainer update stages. */ interface UpdateStages { - /** The stage of the ModelContainerData update allowing to specify properties. */ + /** The stage of the ComponentContainer update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -147,7 +147,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(ModelContainerDetails properties); + Update withProperties(ComponentContainerProperties properties); } } /** @@ -155,7 +155,7 @@ interface WithProperties { * * @return the refreshed resource. */ - ModelContainerData refresh(); + ComponentContainer refresh(); /** * Refreshes the resource to sync with Azure. @@ -163,5 +163,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - ModelContainerData refresh(Context context); + ComponentContainer refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java similarity index 73% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java index 194613dc4553d..c1c169d3a8942 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java @@ -12,31 +12,31 @@ * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. */ @Fluent -public final class ComponentContainerDetails extends AssetContainer { +public final class ComponentContainerProperties extends AssetContainer { /** {@inheritDoc} */ @Override - public ComponentContainerDetails withIsArchived(Boolean isArchived) { + public ComponentContainerProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public ComponentContainerDetails withDescription(String description) { + public ComponentContainerProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public ComponentContainerDetails withProperties(Map properties) { + public ComponentContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public ComponentContainerDetails withTags(Map tags) { + public ComponentContainerProperties withTags(Map tags) { super.withTags(tags); return this; } 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 index 728f0888c6d48..0dc316652454e 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class ComponentContainerResourceArmPaginatedResult { /* - * The link to the next page of ComponentContainer objects. If null, there - * are no additional pages. + * The link to the next page of ComponentContainer objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class ComponentContainerResourceArmPaginatedResult { * An array of objects of type ComponentContainer. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no @@ -52,7 +51,7 @@ public ComponentContainerResourceArmPaginatedResult withNextLink(String nextLink * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the ComponentContainerResourceArmPaginatedResult object itself. */ - public ComponentContainerResourceArmPaginatedResult withValue(List value) { + public ComponentContainerResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index a282817936b57..83d4d1468bc33 100644 --- 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 @@ -20,7 +20,7 @@ public interface ComponentContainers { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List component containers. @@ -35,7 +35,7 @@ public interface ComponentContainers { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); /** @@ -75,7 +75,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container. */ - ComponentContainerData get(String resourceGroupName, String workspaceName, String name); + ComponentContainer get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -89,7 +89,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -101,7 +101,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - ComponentContainerData getById(String id); + ComponentContainer getById(String id); /** * Get container. @@ -113,7 +113,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete container. @@ -138,10 +138,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new ComponentContainerData resource. + * Begins definition for a new ComponentContainer resource. * * @param name resource name. - * @return the first stage of the new ComponentContainerData definition. + * @return the first stage of the new ComponentContainer definition. */ - ComponentContainerData.DefinitionStages.Blank define(String name); + ComponentContainer.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java similarity index 73% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java index f10b5ef1c0212..3b45a1f1eb5e9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -/** An immutable client-side representation of ComponentVersionData. */ -public interface ComponentVersionData { +/** An immutable client-side representation of ComponentVersion. */ +public interface ComponentVersion { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface ComponentVersionData { * * @return the properties value. */ - ComponentVersionDetails properties(); + ComponentVersionProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface ComponentVersionData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner object. * * @return the inner object. */ - ComponentVersionDataInner innerModel(); + ComponentVersionInner innerModel(); - /** The entirety of the ComponentVersionData definition. */ + /** The entirety of the ComponentVersion definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ComponentVersionData definition stages. */ + /** The ComponentVersion definition stages. */ interface DefinitionStages { - /** The first stage of the ComponentVersionData definition. */ + /** The first stage of the ComponentVersion definition. */ interface Blank extends WithParentResource { } - /** The stage of the ComponentVersionData definition allowing to specify parent resource. */ + /** The stage of the ComponentVersion definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, name. @@ -83,7 +83,7 @@ interface WithParentResource { */ WithProperties withExistingComponent(String resourceGroupName, String workspaceName, String name); } - /** The stage of the ComponentVersionData definition allowing to specify properties. */ + /** The stage of the ComponentVersion definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -91,10 +91,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(ComponentVersionDetails properties); + WithCreate withProperties(ComponentVersionProperties properties); } /** - * The stage of the ComponentVersionData definition which contains all the minimum required properties for the + * 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 { @@ -103,7 +103,7 @@ interface WithCreate { * * @return the created resource. */ - ComponentVersionData create(); + ComponentVersion create(); /** * Executes the create request. @@ -111,24 +111,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - ComponentVersionData create(Context context); + ComponentVersion create(Context context); } } /** - * Begins update for the ComponentVersionData resource. + * Begins update for the ComponentVersion resource. * * @return the stage of resource update. */ - ComponentVersionData.Update update(); + ComponentVersion.Update update(); - /** The template for ComponentVersionData update. */ + /** The template for ComponentVersion update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - ComponentVersionData apply(); + ComponentVersion apply(); /** * Executes the update request. @@ -136,11 +136,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - ComponentVersionData apply(Context context); + ComponentVersion apply(Context context); } - /** The ComponentVersionData update stages. */ + /** The ComponentVersion update stages. */ interface UpdateStages { - /** The stage of the ComponentVersionData update allowing to specify properties. */ + /** The stage of the ComponentVersion update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -148,7 +148,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(ComponentVersionDetails properties); + Update withProperties(ComponentVersionProperties properties); } } /** @@ -156,7 +156,7 @@ interface WithProperties { * * @return the refreshed resource. */ - ComponentVersionData refresh(); + ComponentVersion refresh(); /** * Refreshes the resource to sync with Azure. @@ -164,5 +164,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - ComponentVersionData refresh(Context context); + ComponentVersion refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java similarity index 73% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java index 83c9494380180..e1a466b4199a9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java @@ -10,12 +10,10 @@ /** Definition of a component version: defines resources that span component types. */ @Fluent -public final class ComponentVersionDetails extends AssetBase { +public final class ComponentVersionProperties extends AssetBase { /* * Defines Component definition details. - * + * */ @JsonProperty(value = "componentSpec") private Object componentSpec; @@ -35,44 +33,44 @@ public Object componentSpec() { * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. * * @param componentSpec the componentSpec value to set. - * @return the ComponentVersionDetails object itself. + * @return the ComponentVersionProperties object itself. */ - public ComponentVersionDetails withComponentSpec(Object componentSpec) { + public ComponentVersionProperties withComponentSpec(Object componentSpec) { this.componentSpec = componentSpec; return this; } /** {@inheritDoc} */ @Override - public ComponentVersionDetails withIsAnonymous(Boolean isAnonymous) { + public ComponentVersionProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } /** {@inheritDoc} */ @Override - public ComponentVersionDetails withIsArchived(Boolean isArchived) { + public ComponentVersionProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public ComponentVersionDetails withDescription(String description) { + public ComponentVersionProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public ComponentVersionDetails withProperties(Map properties) { + public ComponentVersionProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public ComponentVersionDetails withTags(Map tags) { + public ComponentVersionProperties withTags(Map tags) { super.withTags(tags); return this; } 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 index 58cc3eb90ab48..0c78c819fb8a4 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class ComponentVersionResourceArmPaginatedResult { /* - * The link to the next page of ComponentVersion objects. If null, there - * are no additional pages. + * The link to the next page of ComponentVersion objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class ComponentVersionResourceArmPaginatedResult { * An array of objects of type ComponentVersion. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no @@ -52,7 +51,7 @@ public ComponentVersionResourceArmPaginatedResult withNextLink(String nextLink) * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the ComponentVersionResourceArmPaginatedResult object itself. */ - public ComponentVersionResourceArmPaginatedResult withValue(List value) { + public ComponentVersionResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 0778a179a33b4..0af9347ab9a29 100644 --- 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 @@ -21,7 +21,7 @@ public interface ComponentVersions { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List component versions. @@ -39,7 +39,7 @@ public interface ComponentVersions { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -90,7 +90,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version. */ - ComponentVersionData get(String resourceGroupName, String workspaceName, String name, String version); + ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -105,7 +105,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -117,7 +117,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - ComponentVersionData getById(String id); + ComponentVersion getById(String id); /** * Get version. @@ -129,7 +129,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete version. @@ -154,10 +154,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new ComponentVersionData resource. + * Begins definition for a new ComponentVersion resource. * * @param name resource name. - * @return the first stage of the new ComponentVersionData definition. + * @return the first stage of the new ComponentVersion definition. */ - ComponentVersionData.DefinitionStages.Blank define(String name); + 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 index ad954b0114c74..e5d5caf5f55f1 100644 --- 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 @@ -41,11 +41,10 @@ public class Compute { private String computeLocation; /* - * The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. + * 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; + private ComputeProvisioningState provisioningState; /* * The description of the Machine Learning compute. @@ -78,15 +77,14 @@ public class Compute { 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. + * 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. + * Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. */ @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; @@ -106,7 +104,7 @@ public String computeLocation() { * * @return the provisioningState value. */ - public ProvisioningState provisioningState() { + public ComputeProvisioningState provisioningState() { return this.provisioningState; } 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 index 3ed3353f6e7b8..6dc1f4a4fe3c4 100644 --- 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 @@ -17,8 +17,7 @@ public final class ComputeInstanceConnectivityEndpoints { private String publicIpAddress; /* - * Private IP Address of this ComputeInstance (local to the VNET in which - * the compute instance is deployed). + * 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; 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 index 2a51e2588b51e..58952e583d44e 100644 --- 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 @@ -23,8 +23,10 @@ public final class ComputeInstanceDataDisk { 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. + * 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; @@ -76,8 +78,10 @@ public ComputeInstanceDataDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * 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. + * 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. */ @@ -86,8 +90,10 @@ public Integer 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. + * 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. 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 index 5620dcfe07333..235aa502269a7 100644 --- 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 @@ -54,7 +54,9 @@ public final class ComputeInstanceDataMount { private MountState mountState; /* - * Mounted time. The time when the disk mounted. + * Mounted time. + * + * The time when the disk mounted. */ @JsonProperty(value = "mountedOn") private OffsetDateTime mountedOn; @@ -206,7 +208,9 @@ public ComputeInstanceDataMount withMountState(MountState mountState) { } /** - * Get the mountedOn property: Mounted time. The time when the disk mounted. + * Get the mountedOn property: Mounted time. + * + *

The time when the disk mounted. * * @return the mountedOn value. */ @@ -215,7 +219,9 @@ public OffsetDateTime mountedOn() { } /** - * Set the mountedOn property: Mounted time. The time when the disk mounted. + * Set the mountedOn property: Mounted time. + * + *

The time when the disk mounted. * * @param mountedOn the mountedOn value to set. * @return the ComputeInstanceDataMount object itself. 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 index 3b554e6403b23..175c231cf2ba2 100644 --- 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 @@ -25,10 +25,10 @@ public final class ComputeInstanceProperties { 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 + * 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") @@ -40,6 +40,12 @@ public final class ComputeInstanceProperties { @JsonProperty(value = "sshSettings") private ComputeInstanceSshSettings sshSettings; + /* + * List of Custom Services added to the compute. + */ + @JsonProperty(value = "customServices") + private List customServices; + /* * Describes all connectivity endpoints available for this ComputeInstance. */ @@ -47,8 +53,7 @@ public final class ComputeInstanceProperties { private ComputeInstanceConnectivityEndpoints connectivityEndpoints; /* - * Describes available applications and their endpoints on this - * ComputeInstance. + * Describes available applications and their endpoints on this ComputeInstance. */ @JsonProperty(value = "applications", access = JsonProperty.Access.WRITE_ONLY) private List applications; @@ -60,7 +65,9 @@ public final class ComputeInstanceProperties { private ComputeInstanceCreatedBy createdBy; /* - * Errors. Collection of errors encountered on this ComputeInstance. + * Errors. + * + * Collection of errors encountered on this ComputeInstance. */ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private List errors; @@ -72,8 +79,9 @@ public final class ComputeInstanceProperties { private ComputeInstanceState state; /* - * Compute Instance Authorization type. The Compute Instance Authorization - * type. Available values are personal (default). + * Compute Instance Authorization type. + * + * The Compute Instance Authorization type. Available values are personal (default). */ @JsonProperty(value = "computeInstanceAuthorizationType") private ComputeInstanceAuthorizationType computeInstanceAuthorizationType; @@ -103,11 +111,18 @@ public final class ComputeInstanceProperties { 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. + * Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 + * min, maximum is 3 days. + */ + @JsonProperty(value = "idleTimeBeforeShutdown") + private String idleTimeBeforeShutdown; + + /* + * 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; @@ -177,10 +192,11 @@ public ComputeInstanceProperties withSubnet(ResourceId subnet) { } /** - * 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. + * 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. */ @@ -189,10 +205,11 @@ public ApplicationSharingPolicy 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. + * 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. @@ -222,6 +239,26 @@ public ComputeInstanceProperties withSshSettings(ComputeInstanceSshSettings sshS return this; } + /** + * Get the customServices property: List of Custom Services added to the compute. + * + * @return the customServices value. + */ + public List customServices() { + return this.customServices; + } + + /** + * Set the customServices property: List of Custom Services added to the compute. + * + * @param customServices the customServices value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withCustomServices(List customServices) { + this.customServices = customServices; + return this; + } + /** * Get the connectivityEndpoints property: Describes all connectivity endpoints available for this ComputeInstance. * @@ -250,7 +287,9 @@ public ComputeInstanceCreatedBy createdBy() { } /** - * Get the errors property: Errors. Collection of errors encountered on this ComputeInstance. + * Get the errors property: Errors. + * + *

Collection of errors encountered on this ComputeInstance. * * @return the errors value. */ @@ -268,8 +307,9 @@ public ComputeInstanceState state() { } /** - * Get the computeInstanceAuthorizationType property: Compute Instance Authorization type. The Compute Instance - * Authorization type. Available values are personal (default). + * Get the computeInstanceAuthorizationType property: Compute Instance Authorization type. + * + *

The Compute Instance Authorization type. Available values are personal (default). * * @return the computeInstanceAuthorizationType value. */ @@ -278,8 +318,9 @@ public ComputeInstanceAuthorizationType computeInstanceAuthorizationType() { } /** - * Set the computeInstanceAuthorizationType property: Compute Instance Authorization type. The Compute Instance - * Authorization type. Available values are personal (default). + * 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. @@ -350,9 +391,33 @@ public ComputeSchedules 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. + * Get the idleTimeBeforeShutdown property: Stops compute instance after user defined period of inactivity. Time is + * defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + * + * @return the idleTimeBeforeShutdown value. + */ + public String idleTimeBeforeShutdown() { + return this.idleTimeBeforeShutdown; + } + + /** + * Set the idleTimeBeforeShutdown property: Stops compute instance after user defined period of inactivity. Time is + * defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + * + * @param idleTimeBeforeShutdown the idleTimeBeforeShutdown value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withIdleTimeBeforeShutdown(String idleTimeBeforeShutdown) { + this.idleTimeBeforeShutdown = idleTimeBeforeShutdown; + return this; + } + + /** + * 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. */ @@ -361,9 +426,11 @@ public Boolean 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. + * 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. @@ -421,6 +488,9 @@ public void validate() { if (sshSettings() != null) { sshSettings().validate(); } + if (customServices() != null) { + customServices().forEach(e -> e.validate()); + } if (connectivityEndpoints() != null) { connectivityEndpoints().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 index 1ccf20d6d7f14..9d65f8e36a2e2 100644 --- 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 @@ -11,10 +11,11 @@ @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. + * 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; @@ -32,16 +33,18 @@ public final class ComputeInstanceSshSettings { 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. + * Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key + * pairs. */ @JsonProperty(value = "adminPublicKey") private String adminPublicKey; /** - * Get the sshPublicAccess property: Access policy for SSH State of the public SSH port. Possible values are: - * Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh - * port is open and accessible according to the VNet/subnet policy if applicable. + * 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. */ @@ -50,9 +53,11 @@ public SshPublicAccess 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. + * 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeProvisioningState.java new file mode 100644 index 0000000000000..57c9054d40eb2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeProvisioningState.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 ComputeProvisioningState. */ +public final class ComputeProvisioningState extends ExpandableStringEnum { + /** Static value Unknown for ComputeProvisioningState. */ + public static final ComputeProvisioningState UNKNOWN = fromString("Unknown"); + + /** Static value Updating for ComputeProvisioningState. */ + public static final ComputeProvisioningState UPDATING = fromString("Updating"); + + /** Static value Creating for ComputeProvisioningState. */ + public static final ComputeProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for ComputeProvisioningState. */ + public static final ComputeProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for ComputeProvisioningState. */ + public static final ComputeProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ComputeProvisioningState. */ + public static final ComputeProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ComputeProvisioningState. */ + public static final ComputeProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates or finds a ComputeProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComputeProvisioningState. + */ + @JsonCreator + public static ComputeProvisioningState fromString(String name) { + return fromString(name, ComputeProvisioningState.class); + } + + /** + * Gets known ComputeProvisioningState values. + * + * @return known ComputeProvisioningState values. + */ + public static Collection values() { + return values(ComputeProvisioningState.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 index f83d48f467a04..90b6ebb425e2a 100644 --- 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 @@ -10,6 +10,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; +import java.util.List; import java.util.Map; /** An immutable client-side representation of ComputeResource. */ @@ -261,6 +262,28 @@ interface WithProperties { */ ComputeResource refresh(Context context); + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateCustomServices(List customServices); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 updateCustomServicesWithResponse(List customServices, Context context); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -357,4 +380,26 @@ interface WithProperties { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void restart(Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateIdleShutdownSetting(IdleShutdownSetting parameters); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 updateIdleShutdownSettingWithResponse(IdleShutdownSetting parameters, Context context); } 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 index a0e3d4b8ecec6..be411c7f61599 100644 --- 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 @@ -29,7 +29,7 @@ public final class ComputeStartStopSchedule { private ComputePowerAction action; /* - * Base definition of a schedule + * The schedule property. */ @JsonProperty(value = "schedule") private ScheduleBase schedule; @@ -73,7 +73,7 @@ public ComputeStartStopSchedule withAction(ComputePowerAction action) { } /** - * Get the schedule property: Base definition of a schedule. + * Get the schedule property: The schedule property. * * @return the schedule value. */ @@ -82,7 +82,7 @@ public ScheduleBase schedule() { } /** - * Set the schedule property: Base definition of a schedule. + * Set the schedule property: The schedule property. * * @param schedule the schedule value to set. * @return the ComputeStartStopSchedule object itself. 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 index 2da58eeb2d7ab..c6c79b71d5602 100644 --- 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 @@ -7,6 +7,7 @@ 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 Computes. */ public interface Computes { @@ -104,6 +105,40 @@ void delete( UnderlyingResourceAction underlyingResourceAction, Context context); + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateCustomServices( + String resourceGroupName, String workspaceName, String computeName, List customServices); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the 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 customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 updateCustomServicesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + List customServices, + Context context); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -239,6 +274,40 @@ Response listKeysWithResponse( */ void restart(String resourceGroupName, String workspaceName, String computeName, Context context); + /** + * Updates the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateIdleShutdownSetting( + String resourceGroupName, String workspaceName, String computeName, IdleShutdownSetting parameters); + + /** + * Updates the idle shutdown setting of 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 parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 updateIdleShutdownSettingWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + IdleShutdownSetting parameters, + 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. 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 new file mode 100644 index 0000000000000..7046508ae0685 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 ConnectionAuthType. */ +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 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 new file mode 100644 index 0000000000000..70ad58062a091 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 ConnectionCategory. */ +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 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/CronSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronSchedule.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java index 71922cf32584b..12eea9f3cad6b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronSchedule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java @@ -9,13 +9,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -/** Cron schedule definition. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scheduleType") +/** The CronTrigger model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType") @JsonTypeName("Cron") @Fluent -public final class CronSchedule extends ScheduleBase { +public final class CronTrigger extends TriggerBase { /* * [Required] Specifies cron expression of schedule. * The expression should follow NCronTab format. @@ -38,37 +37,30 @@ public String expression() { * NCronTab format. * * @param expression the expression value to set. - * @return the CronSchedule object itself. + * @return the CronTrigger object itself. */ - public CronSchedule withExpression(String expression) { + public CronTrigger withExpression(String expression) { this.expression = expression; return this; } /** {@inheritDoc} */ @Override - public CronSchedule withEndTime(OffsetDateTime endTime) { + public CronTrigger withEndTime(String endTime) { super.withEndTime(endTime); return this; } /** {@inheritDoc} */ @Override - public CronSchedule withScheduleStatus(ScheduleStatus scheduleStatus) { - super.withScheduleStatus(scheduleStatus); - return this; - } - - /** {@inheritDoc} */ - @Override - public CronSchedule withStartTime(OffsetDateTime startTime) { + public CronTrigger withStartTime(String startTime) { super.withStartTime(startTime); return this; } /** {@inheritDoc} */ @Override - public CronSchedule withTimeZone(String timeZone) { + public CronTrigger withTimeZone(String timeZone) { super.withTimeZone(timeZone); return this; } @@ -84,9 +76,9 @@ public void validate() { if (expression() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property expression in model CronSchedule")); + new IllegalArgumentException("Missing required property expression in model CronTrigger")); } } - private static final ClientLogger LOGGER = new ClientLogger(CronSchedule.class); + 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/CsvExportSummary.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CsvExportSummary.java new file mode 100644 index 0000000000000..235c58889c218 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CsvExportSummary.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The CsvExportSummary model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("CSV") +@Immutable +public final class CsvExportSummary extends ExportSummaryInner { + /* + * The container name to which the labels will be exported. + */ + @JsonProperty(value = "containerName", access = JsonProperty.Access.WRITE_ONLY) + private String containerName; + + /* + * The output path where the labels will be exported. + */ + @JsonProperty(value = "snapshotPath", access = JsonProperty.Access.WRITE_ONLY) + private String snapshotPath; + + /** + * Get the containerName property: The container name to which the labels will be exported. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Get the snapshotPath property: The output path where the labels will be exported. + * + * @return the snapshotPath value. + */ + public String snapshotPath() { + return this.snapshotPath; + } + + /** + * 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 index d943e49597247..9b86651c289f1 100644 --- 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 @@ -12,7 +12,7 @@ /** The CustomModelJobInput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("CustomModel") +@JsonTypeName("custom_model") @Fluent public final class CustomModelJobInput extends JobInput { /* 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 index 5e595b21bd151..ae37d949b83e1 100644 --- 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 @@ -11,7 +11,7 @@ /** The CustomModelJobOutput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("CustomModel") +@JsonTypeName("custom_model") @Fluent public final class CustomModelJobOutput extends JobOutput { /* diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java new file mode 100644 index 0000000000000..5e3aac409845c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Specifies the custom service configuration. */ +@Fluent +public final class CustomService { + /* + * Name of the Custom Service + */ + @JsonProperty(value = "name") + private String name; + + /* + * Describes the Image Specifications + */ + @JsonProperty(value = "image") + private Image image; + + /* + * Environment Variable for the container + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Describes the docker settings for the image + */ + @JsonProperty(value = "docker") + private Docker docker; + + /* + * Configuring the endpoints for the container + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /* + * Configuring the volumes for the container + */ + @JsonProperty(value = "volumes") + private List volumes; + + /* + * Specifies the custom service configuration + */ + @JsonIgnore private Map additionalProperties; + + /** + * Get the name property: Name of the Custom Service. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the Custom Service. + * + * @param name the name value to set. + * @return the CustomService object itself. + */ + public CustomService withName(String name) { + this.name = name; + return this; + } + + /** + * Get the image property: Describes the Image Specifications. + * + * @return the image value. + */ + public Image image() { + return this.image; + } + + /** + * Set the image property: Describes the Image Specifications. + * + * @param image the image value to set. + * @return the CustomService object itself. + */ + public CustomService withImage(Image image) { + this.image = image; + return this; + } + + /** + * Get the environmentVariables property: Environment Variable for the container. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment Variable for the container. + * + * @param environmentVariables the environmentVariables value to set. + * @return the CustomService object itself. + */ + public CustomService withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the docker property: Describes the docker settings for the image. + * + * @return the docker value. + */ + public Docker docker() { + return this.docker; + } + + /** + * Set the docker property: Describes the docker settings for the image. + * + * @param docker the docker value to set. + * @return the CustomService object itself. + */ + public CustomService withDocker(Docker docker) { + this.docker = docker; + return this; + } + + /** + * Get the endpoints property: Configuring the endpoints for the container. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: Configuring the endpoints for the container. + * + * @param endpoints the endpoints value to set. + * @return the CustomService object itself. + */ + public CustomService withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the volumes property: Configuring the volumes for the container. + * + * @return the volumes value. + */ + public List volumes() { + return this.volumes; + } + + /** + * Set the volumes property: Configuring the volumes for the container. + * + * @param volumes the volumes value to set. + * @return the CustomService object itself. + */ + public CustomService withVolumes(List volumes) { + this.volumes = volumes; + return this; + } + + /** + * Get the additionalProperties property: Specifies the custom service configuration. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Specifies the custom service configuration. + * + * @param additionalProperties the additionalProperties value to set. + * @return the CustomService object itself. + */ + public CustomService withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void withAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, value); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (image() != null) { + image().validate(); + } + if (environmentVariables() != null) { + environmentVariables() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (docker() != null) { + docker().validate(); + } + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + if (volumes() != null) { + volumes().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java index cccbc3bab2b93..59ae115c87e89 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -/** An immutable client-side representation of DataContainerData. */ -public interface DataContainerData { +/** An immutable client-side representation of DataContainer. */ +public interface DataContainer { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface DataContainerData { * * @return the properties value. */ - DataContainerDetails properties(); + DataContainerProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface DataContainerData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner object. * * @return the inner object. */ - DataContainerDataInner innerModel(); + DataContainerInner innerModel(); - /** The entirety of the DataContainerData definition. */ + /** The entirety of the DataContainer definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The DataContainerData definition stages. */ + /** The DataContainer definition stages. */ interface DefinitionStages { - /** The first stage of the DataContainerData definition. */ + /** The first stage of the DataContainer definition. */ interface Blank extends WithParentResource { } - /** The stage of the DataContainerData definition allowing to specify parent resource. */ + /** The stage of the DataContainer definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -82,7 +82,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the DataContainerData definition allowing to specify properties. */ + /** The stage of the DataContainer definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -90,11 +90,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(DataContainerDetails properties); + WithCreate withProperties(DataContainerProperties properties); } /** - * The stage of the DataContainerData definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * 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 { /** @@ -102,7 +102,7 @@ interface WithCreate { * * @return the created resource. */ - DataContainerData create(); + DataContainer create(); /** * Executes the create request. @@ -110,24 +110,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - DataContainerData create(Context context); + DataContainer create(Context context); } } /** - * Begins update for the DataContainerData resource. + * Begins update for the DataContainer resource. * * @return the stage of resource update. */ - DataContainerData.Update update(); + DataContainer.Update update(); - /** The template for DataContainerData update. */ + /** The template for DataContainer update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - DataContainerData apply(); + DataContainer apply(); /** * Executes the update request. @@ -135,11 +135,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - DataContainerData apply(Context context); + DataContainer apply(Context context); } - /** The DataContainerData update stages. */ + /** The DataContainer update stages. */ interface UpdateStages { - /** The stage of the DataContainerData update allowing to specify properties. */ + /** The stage of the DataContainer update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -147,7 +147,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(DataContainerDetails properties); + Update withProperties(DataContainerProperties properties); } } /** @@ -155,7 +155,7 @@ interface WithProperties { * * @return the refreshed resource. */ - DataContainerData refresh(); + DataContainer refresh(); /** * Refreshes the resource to sync with Azure. @@ -163,5 +163,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - DataContainerData refresh(Context context); + DataContainer refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java index ec67bda20e92c..f69c3a4d6cb57 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java @@ -11,7 +11,7 @@ /** Container for data asset versions. */ @Fluent -public final class DataContainerDetails extends AssetContainer { +public final class DataContainerProperties extends AssetContainer { /* * [Required] Specifies the type of data. */ @@ -31,37 +31,37 @@ public DataType dataType() { * Set the dataType property: [Required] Specifies the type of data. * * @param dataType the dataType value to set. - * @return the DataContainerDetails object itself. + * @return the DataContainerProperties object itself. */ - public DataContainerDetails withDataType(DataType dataType) { + public DataContainerProperties withDataType(DataType dataType) { this.dataType = dataType; return this; } /** {@inheritDoc} */ @Override - public DataContainerDetails withIsArchived(Boolean isArchived) { + public DataContainerProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public DataContainerDetails withDescription(String description) { + public DataContainerProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public DataContainerDetails withProperties(Map properties) { + public DataContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public DataContainerDetails withTags(Map tags) { + public DataContainerProperties withTags(Map tags) { super.withTags(tags); return this; } @@ -77,9 +77,10 @@ public void validate() { if (dataType() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property dataType in model DataContainerDetails")); + new IllegalArgumentException( + "Missing required property dataType in model DataContainerProperties")); } } - private static final ClientLogger LOGGER = new ClientLogger(DataContainerDetails.class); + 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 index f61ab9b1c0206..5cdc7fe0617ab 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class DataContainerResourceArmPaginatedResult { /* - * The link to the next page of DataContainer objects. If null, there are - * no additional pages. + * The link to the next page of DataContainer objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class DataContainerResourceArmPaginatedResult { * An array of objects of type DataContainer. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional @@ -52,7 +51,7 @@ public DataContainerResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the DataContainerResourceArmPaginatedResult object itself. */ - public DataContainerResourceArmPaginatedResult withValue(List value) { + public DataContainerResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 78b930a342288..782367112fca4 100644 --- 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 @@ -20,7 +20,7 @@ public interface DataContainers { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List data containers. @@ -35,7 +35,7 @@ public interface DataContainers { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); /** @@ -75,7 +75,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container. */ - DataContainerData get(String resourceGroupName, String workspaceName, String name); + DataContainer get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -89,7 +89,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -101,7 +101,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - DataContainerData getById(String id); + DataContainer getById(String id); /** * Get container. @@ -113,7 +113,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete container. @@ -138,10 +138,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new DataContainerData resource. + * Begins definition for a new DataContainer resource. * * @param name resource name. - * @return the first stage of the new DataContainerData definition. + * @return the first stage of the new DataContainer definition. */ - DataContainerData.DefinitionStages.Blank define(String name); + DataContainer.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataSettings.java deleted file mode 100644 index b22637a92e9fc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataSettings.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Collection of registered Tabular Dataset Ids and other data settings required for training and validating models. */ -@Fluent -public class DataSettings { - /* - * [Required] Target column name: This is prediction values column. - * Also known as label column name in context of classification tasks. - */ - @JsonProperty(value = "targetColumnName", required = true) - private String targetColumnName; - - /* - * Test data input. - */ - @JsonProperty(value = "testData") - private TestDataSettings testData; - - /* - * [Required] Training data input. - */ - @JsonProperty(value = "trainingData", required = true) - private TrainingDataSettings trainingData; - - /** - * Get the targetColumnName property: [Required] Target column name: This is prediction values column. Also known as - * label column name in context of classification tasks. - * - * @return the targetColumnName value. - */ - public String targetColumnName() { - return this.targetColumnName; - } - - /** - * Set the targetColumnName property: [Required] Target column name: This is prediction values column. Also known as - * label column name in context of classification tasks. - * - * @param targetColumnName the targetColumnName value to set. - * @return the DataSettings object itself. - */ - public DataSettings withTargetColumnName(String targetColumnName) { - this.targetColumnName = targetColumnName; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public TestDataSettings testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the DataSettings object itself. - */ - public DataSettings withTestData(TestDataSettings testData) { - this.testData = testData; - return this; - } - - /** - * Get the trainingData property: [Required] Training data input. - * - * @return the trainingData value. - */ - public TrainingDataSettings trainingData() { - return this.trainingData; - } - - /** - * Set the trainingData property: [Required] Training data input. - * - * @param trainingData the trainingData value to set. - * @return the DataSettings object itself. - */ - public DataSettings withTrainingData(TrainingDataSettings trainingData) { - this.trainingData = trainingData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetColumnName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property targetColumnName in model DataSettings")); - } - if (testData() != null) { - testData().validate(); - } - if (trainingData() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property trainingData in model DataSettings")); - } else { - trainingData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataSettings.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java index cfa71f5d77772..0b2025866320b 100644 --- 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 @@ -10,14 +10,14 @@ /** Defines values for DataType. */ public final class DataType extends ExpandableStringEnum { - /** Static value UriFile for DataType. */ - public static final DataType URI_FILE = fromString("UriFile"); + /** Static value uri_file for DataType. */ + public static final DataType URI_FILE = fromString("uri_file"); - /** Static value UriFolder for DataType. */ - public static final DataType URI_FOLDER = fromString("UriFolder"); + /** 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"); + /** Static value mltable for DataType. */ + public static final DataType MLTABLE = fromString("mltable"); /** * Creates or finds a DataType from its string representation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java index a3b595ae33fe1..ad254ac4664f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -/** An immutable client-side representation of DataVersionBaseData. */ -public interface DataVersionBaseData { +/** An immutable client-side representation of DataVersionBase. */ +public interface DataVersionBase { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface DataVersionBaseData { * * @return the properties value. */ - DataVersionBaseDetails properties(); + DataVersionBaseProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface DataVersionBaseData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner object. * * @return the inner object. */ - DataVersionBaseDataInner innerModel(); + DataVersionBaseInner innerModel(); - /** The entirety of the DataVersionBaseData definition. */ + /** The entirety of the DataVersionBase definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The DataVersionBaseData definition stages. */ + /** The DataVersionBase definition stages. */ interface DefinitionStages { - /** The first stage of the DataVersionBaseData definition. */ + /** The first stage of the DataVersionBase definition. */ interface Blank extends WithParentResource { } - /** The stage of the DataVersionBaseData definition allowing to specify parent resource. */ + /** The stage of the DataVersionBase definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, name. @@ -83,7 +83,7 @@ interface WithParentResource { */ WithProperties withExistingData(String resourceGroupName, String workspaceName, String name); } - /** The stage of the DataVersionBaseData definition allowing to specify properties. */ + /** The stage of the DataVersionBase definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -91,10 +91,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(DataVersionBaseDetails properties); + WithCreate withProperties(DataVersionBaseProperties properties); } /** - * The stage of the DataVersionBaseData definition which contains all the minimum required properties for the + * 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 { @@ -103,7 +103,7 @@ interface WithCreate { * * @return the created resource. */ - DataVersionBaseData create(); + DataVersionBase create(); /** * Executes the create request. @@ -111,24 +111,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - DataVersionBaseData create(Context context); + DataVersionBase create(Context context); } } /** - * Begins update for the DataVersionBaseData resource. + * Begins update for the DataVersionBase resource. * * @return the stage of resource update. */ - DataVersionBaseData.Update update(); + DataVersionBase.Update update(); - /** The template for DataVersionBaseData update. */ + /** The template for DataVersionBase update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - DataVersionBaseData apply(); + DataVersionBase apply(); /** * Executes the update request. @@ -136,11 +136,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - DataVersionBaseData apply(Context context); + DataVersionBase apply(Context context); } - /** The DataVersionBaseData update stages. */ + /** The DataVersionBase update stages. */ interface UpdateStages { - /** The stage of the DataVersionBaseData update allowing to specify properties. */ + /** The stage of the DataVersionBase update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -148,7 +148,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(DataVersionBaseDetails properties); + Update withProperties(DataVersionBaseProperties properties); } } /** @@ -156,7 +156,7 @@ interface WithProperties { * * @return the refreshed resource. */ - DataVersionBaseData refresh(); + DataVersionBase refresh(); /** * Refreshes the resource to sync with Azure. @@ -164,5 +164,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - DataVersionBaseData refresh(Context context); + DataVersionBase refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java similarity index 66% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java index ecf45ae7a65d1..a177d905daaca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java @@ -17,25 +17,25 @@ use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType", - defaultImpl = DataVersionBaseDetails.class) -@JsonTypeName("DataVersionBaseDetails") + defaultImpl = DataVersionBaseProperties.class) +@JsonTypeName("DataVersionBaseProperties") @JsonSubTypes({ - @JsonSubTypes.Type(name = "MLTable", value = MLTableData.class), - @JsonSubTypes.Type(name = "UriFile", value = UriFileDataVersion.class), - @JsonSubTypes.Type(name = "UriFolder", value = UriFolderDataVersion.class) + @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 DataVersionBaseDetails extends AssetBase { +public class DataVersionBaseProperties extends AssetBase { /* * [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType + * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220601Preview.Assets.DataVersionBase.DataType */ @JsonProperty(value = "dataUri", required = true) private String dataUri; /** * Get the dataUri property: [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. + * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220601Preview.Assets.DataVersionBase.DataType. * * @return the dataUri value. */ @@ -45,47 +45,47 @@ public String dataUri() { /** * Set the dataUri property: [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. + * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220601Preview.Assets.DataVersionBase.DataType. * * @param dataUri the dataUri value to set. - * @return the DataVersionBaseDetails object itself. + * @return the DataVersionBaseProperties object itself. */ - public DataVersionBaseDetails withDataUri(String dataUri) { + public DataVersionBaseProperties withDataUri(String dataUri) { this.dataUri = dataUri; return this; } /** {@inheritDoc} */ @Override - public DataVersionBaseDetails withIsAnonymous(Boolean isAnonymous) { + public DataVersionBaseProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } /** {@inheritDoc} */ @Override - public DataVersionBaseDetails withIsArchived(Boolean isArchived) { + public DataVersionBaseProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public DataVersionBaseDetails withDescription(String description) { + public DataVersionBaseProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public DataVersionBaseDetails withProperties(Map properties) { + public DataVersionBaseProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public DataVersionBaseDetails withTags(Map tags) { + public DataVersionBaseProperties withTags(Map tags) { super.withTags(tags); return this; } @@ -101,9 +101,10 @@ public void validate() { if (dataUri() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property dataUri in model DataVersionBaseDetails")); + new IllegalArgumentException( + "Missing required property dataUri in model DataVersionBaseProperties")); } } - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseDetails.class); + 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 index ad68313cd5715..8879a82905521 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class DataVersionBaseResourceArmPaginatedResult { /* - * The link to the next page of DataVersionBase objects. If null, there are - * no additional pages. + * The link to the next page of DataVersionBase objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class DataVersionBaseResourceArmPaginatedResult { * An array of objects of type DataVersionBase. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional @@ -52,7 +51,7 @@ public DataVersionBaseResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the DataVersionBaseResourceArmPaginatedResult object itself. */ - public DataVersionBaseResourceArmPaginatedResult withValue(List value) { + public DataVersionBaseResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 11e5787a3ee08..75f80829a31ee 100644 --- 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 @@ -21,7 +21,7 @@ public interface DataVersions { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List data versions in the data container. @@ -42,7 +42,7 @@ public interface DataVersions { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -94,7 +94,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version. */ - DataVersionBaseData get(String resourceGroupName, String workspaceName, String name, String version); + DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -109,7 +109,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -121,7 +121,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - DataVersionBaseData getById(String id); + DataVersionBase getById(String id); /** * Get version. @@ -133,7 +133,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete version. @@ -158,10 +158,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new DataVersionBaseData resource. + * Begins definition for a new DataVersionBase resource. * * @param name resource name. - * @return the first stage of the new DataVersionBaseData definition. + * @return the first stage of the new DataVersionBase definition. */ - DataVersionBaseData.DefinitionStages.Blank define(String name); + DataVersionBase.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetExportSummary.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetExportSummary.java new file mode 100644 index 0000000000000..b083b01e8efe5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetExportSummary.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The DatasetExportSummary model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("Dataset") +@Immutable +public final class DatasetExportSummary extends ExportSummaryInner { + /* + * The unique name of the labeled data asset. + */ + @JsonProperty(value = "labeledAssetName", access = JsonProperty.Access.WRITE_ONLY) + private String labeledAssetName; + + /** + * Get the labeledAssetName property: The unique name of the labeled data asset. + * + * @return the labeledAssetName value. + */ + public String labeledAssetName() { + return this.labeledAssetName; + } + + /** + * 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/DatastoreData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java index 9fe35264387e5..92a0908a56412 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java @@ -7,10 +7,10 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -/** An immutable client-side representation of DatastoreData. */ -public interface DatastoreData { +/** An immutable client-side representation of Datastore. */ +public interface Datastore { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -37,7 +37,7 @@ public interface DatastoreData { * * @return the properties value. */ - DatastoreDetails properties(); + DatastoreProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -54,25 +54,25 @@ public interface DatastoreData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner object. * * @return the inner object. */ - DatastoreDataInner innerModel(); + DatastoreInner innerModel(); - /** The entirety of the DatastoreData definition. */ + /** The entirety of the Datastore definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The DatastoreData definition stages. */ + /** The Datastore definition stages. */ interface DefinitionStages { - /** The first stage of the DatastoreData definition. */ + /** The first stage of the Datastore definition. */ interface Blank extends WithParentResource { } - /** The stage of the DatastoreData definition allowing to specify parent resource. */ + /** The stage of the Datastore definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -83,7 +83,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the DatastoreData definition allowing to specify properties. */ + /** The stage of the Datastore definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -91,11 +91,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(DatastoreDetails properties); + WithCreate withProperties(DatastoreProperties properties); } /** - * The stage of the DatastoreData definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. + * 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 { /** @@ -103,7 +103,7 @@ interface WithCreate extends DefinitionStages.WithSkipValidation { * * @return the created resource. */ - DatastoreData create(); + Datastore create(); /** * Executes the create request. @@ -111,9 +111,9 @@ interface WithCreate extends DefinitionStages.WithSkipValidation { * @param context The context to associate with this operation. * @return the created resource. */ - DatastoreData create(Context context); + Datastore create(Context context); } - /** The stage of the DatastoreData definition allowing to specify skipValidation. */ + /** The stage of the Datastore definition allowing to specify skipValidation. */ interface WithSkipValidation { /** * Specifies the skipValidation property: Flag to skip validation.. @@ -125,20 +125,20 @@ interface WithSkipValidation { } } /** - * Begins update for the DatastoreData resource. + * Begins update for the Datastore resource. * * @return the stage of resource update. */ - DatastoreData.Update update(); + Datastore.Update update(); - /** The template for DatastoreData update. */ + /** The template for Datastore update. */ interface Update extends UpdateStages.WithProperties, UpdateStages.WithSkipValidation { /** * Executes the update request. * * @return the updated resource. */ - DatastoreData apply(); + Datastore apply(); /** * Executes the update request. @@ -146,11 +146,11 @@ interface Update extends UpdateStages.WithProperties, UpdateStages.WithSkipValid * @param context The context to associate with this operation. * @return the updated resource. */ - DatastoreData apply(Context context); + Datastore apply(Context context); } - /** The DatastoreData update stages. */ + /** The Datastore update stages. */ interface UpdateStages { - /** The stage of the DatastoreData update allowing to specify properties. */ + /** The stage of the Datastore update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -158,9 +158,9 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(DatastoreDetails properties); + Update withProperties(DatastoreProperties properties); } - /** The stage of the DatastoreData update allowing to specify skipValidation. */ + /** The stage of the Datastore update allowing to specify skipValidation. */ interface WithSkipValidation { /** * Specifies the skipValidation property: Flag to skip validation.. @@ -176,7 +176,7 @@ interface WithSkipValidation { * * @return the refreshed resource. */ - DatastoreData refresh(); + Datastore refresh(); /** * Refreshes the resource to sync with Azure. @@ -184,7 +184,7 @@ interface WithSkipValidation { * @param context The context to associate with this operation. * @return the refreshed resource. */ - DatastoreData refresh(Context context); + Datastore refresh(Context context); /** * Get datastore secrets. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java similarity index 83% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java index efe01d39f09e8..1837fd32f92b5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java @@ -17,8 +17,8 @@ use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType", - defaultImpl = DatastoreDetails.class) -@JsonTypeName("DatastoreDetails") + defaultImpl = DatastoreProperties.class) +@JsonTypeName("DatastoreProperties") @JsonSubTypes({ @JsonSubTypes.Type(name = "AzureBlob", value = AzureBlobDatastore.class), @JsonSubTypes.Type(name = "AzureDataLakeGen1", value = AzureDataLakeGen1Datastore.class), @@ -27,7 +27,7 @@ @JsonSubTypes.Type(name = "Hdfs", value = HdfsDatastore.class) }) @Fluent -public class DatastoreDetails extends ResourceBase { +public class DatastoreProperties extends ResourceBase { /* * [Required] Account credentials. */ @@ -35,8 +35,7 @@ public class DatastoreDetails extends ResourceBase { private DatastoreCredentials credentials; /* - * Readonly property to indicate if datastore is the workspace default - * datastore + * Readonly property to indicate if datastore is the workspace default datastore */ @JsonProperty(value = "isDefault", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDefault; @@ -54,9 +53,9 @@ public DatastoreCredentials credentials() { * Set the credentials property: [Required] Account credentials. * * @param credentials the credentials value to set. - * @return the DatastoreDetails object itself. + * @return the DatastoreProperties object itself. */ - public DatastoreDetails withCredentials(DatastoreCredentials credentials) { + public DatastoreProperties withCredentials(DatastoreCredentials credentials) { this.credentials = credentials; return this; } @@ -72,21 +71,21 @@ public Boolean isDefault() { /** {@inheritDoc} */ @Override - public DatastoreDetails withDescription(String description) { + public DatastoreProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public DatastoreDetails withProperties(Map properties) { + public DatastoreProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public DatastoreDetails withTags(Map tags) { + public DatastoreProperties withTags(Map tags) { super.withTags(tags); return this; } @@ -102,11 +101,11 @@ public void validate() { if (credentials() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property credentials in model DatastoreDetails")); + new IllegalArgumentException("Missing required property credentials in model DatastoreProperties")); } else { credentials().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(DatastoreDetails.class); + 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 index b65e174ffbc8b..7b6dbb35820b4 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class DatastoreResourceArmPaginatedResult { /* - * The link to the next page of Datastore objects. If null, there are no - * additional pages. + * The link to the next page of Datastore objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class DatastoreResourceArmPaginatedResult { * An array of objects of type Datastore. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of Datastore objects. If null, there are no additional @@ -52,7 +51,7 @@ public DatastoreResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the DatastoreResourceArmPaginatedResult object itself. */ - public DatastoreResourceArmPaginatedResult withValue(List value) { + public DatastoreResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 807e16e260f9b..fda61299d18e7 100644 --- 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 @@ -21,7 +21,7 @@ public interface Datastores { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List datastores. @@ -41,7 +41,7 @@ public interface Datastores { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -90,7 +90,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return datastore. */ - DatastoreData get(String resourceGroupName, String workspaceName, String name); + Datastore get(String resourceGroupName, String workspaceName, String name); /** * Get datastore. @@ -104,8 +104,7 @@ PagedIterable list( * @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); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Get datastore secrets. @@ -144,7 +143,7 @@ Response listSecretsWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return datastore along with {@link Response}. */ - DatastoreData getById(String id); + Datastore getById(String id); /** * Get datastore. @@ -156,7 +155,7 @@ Response listSecretsWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete datastore. @@ -181,10 +180,10 @@ Response listSecretsWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new DatastoreData resource. + * Begins definition for a new Datastore resource. * * @param name resource name. - * @return the first stage of the new DatastoreData definition. + * @return the first stage of the new Datastore definition. */ - DatastoreData.DefinitionStages.Blank define(String name); + Datastore.DefinitionStages.Blank define(String name); } 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 new file mode 100644 index 0000000000000..0a12491462b1c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 { + /** {@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/Docker.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java new file mode 100644 index 0000000000000..5a6bd8c34e3dd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; + +/** The Docker model. */ +@Fluent +public final class Docker { + /* + * Indicate whether container shall run in privileged or non-privileged mode. + */ + @JsonProperty(value = "privileged") + private Boolean privileged; + + /* + * Dictionary of + */ + @JsonIgnore private Map additionalProperties; + + /** + * Get the privileged property: Indicate whether container shall run in privileged or non-privileged mode. + * + * @return the privileged value. + */ + public Boolean privileged() { + return this.privileged; + } + + /** + * Set the privileged property: Indicate whether container shall run in privileged or non-privileged mode. + * + * @param privileged the privileged value to set. + * @return the Docker object itself. + */ + public Docker withPrivileged(Boolean privileged) { + this.privileged = privileged; + return this; + } + + /** + * Get the additionalProperties property: Dictionary of <any>. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Dictionary of <any>. + * + * @param additionalProperties the additionalProperties value to set. + * @return the Docker object itself. + */ + public Docker withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void withAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, 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/EncryptionKeyVaultProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java index 3fc151caa45ee..b5f26771487a4 100644 --- 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 @@ -12,8 +12,7 @@ @Fluent public final class EncryptionKeyVaultProperties { /* - * The ArmId of the keyVault where the customer owned encryption key is - * present. + * The ArmId of the keyVault where the customer owned encryption key is present. */ @JsonProperty(value = "keyVaultArmId", required = true) private String keyVaultArmId; @@ -25,8 +24,7 @@ public final class EncryptionKeyVaultProperties { private String keyIdentifier; /* - * For future use - The client id of the identity which will be used to - * access key vault. + * For future use - The client id of the identity which will be used to access key vault. */ @JsonProperty(value = "identityClientId") private String identityClientId; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java new file mode 100644 index 0000000000000..abe3d04442835 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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 EncryptionKeyVaultUpdateProperties model. */ +@Fluent +public final class EncryptionKeyVaultUpdateProperties { + /* + * Key Vault uri to access the encryption key. + */ + @JsonProperty(value = "keyIdentifier", required = true) + private String keyIdentifier; + + /** + * 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 EncryptionKeyVaultUpdateProperties object itself. + */ + public EncryptionKeyVaultUpdateProperties withKeyIdentifier(String keyIdentifier) { + this.keyIdentifier = keyIdentifier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyIdentifier() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property keyIdentifier in model EncryptionKeyVaultUpdateProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultUpdateProperties.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 index 6ee9b191bbda8..59fcd1fbb4ea5 100644 --- 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 @@ -18,8 +18,7 @@ public final class EncryptionProperty { private EncryptionStatus status; /* - * The identity that will be used to access the key vault for encryption at - * rest. + * The identity that will be used to access the key vault for encryption at rest. */ @JsonProperty(value = "identity") private IdentityForCmk identity; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java new file mode 100644 index 0000000000000..d176039cc5364 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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 EncryptionUpdateProperties model. */ +@Fluent +public final class EncryptionUpdateProperties { + /* + * Customer Key vault properties. + */ + @JsonProperty(value = "keyVaultProperties", required = true) + private EncryptionKeyVaultUpdateProperties keyVaultProperties; + + /** + * Get the keyVaultProperties property: Customer Key vault properties. + * + * @return the keyVaultProperties value. + */ + public EncryptionKeyVaultUpdateProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: Customer Key vault properties. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the EncryptionUpdateProperties object itself. + */ + public EncryptionUpdateProperties withKeyVaultProperties(EncryptionKeyVaultUpdateProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property keyVaultProperties in model EncryptionUpdateProperties")); + } else { + keyVaultProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptionUpdateProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java new file mode 100644 index 0000000000000..c1324bc1c7252 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 Endpoint model. */ +@Fluent +public final class Endpoint { + /* + * Endpoint Communication Protocol + * + * Protocol over which communication will happen over this endpoint + */ + @JsonProperty(value = "protocol") + private Protocol protocol; + + /* + * Name of the Endpoint + */ + @JsonProperty(value = "name") + private String name; + + /* + * Application port inside the container. + */ + @JsonProperty(value = "target") + private Integer target; + + /* + * Port over which the application is exposed from container. + */ + @JsonProperty(value = "published") + private Integer published; + + /* + * Host IP over which the application is exposed from the container + */ + @JsonProperty(value = "hostIp") + private String hostIp; + + /** + * Get the protocol property: Endpoint Communication Protocol + * + *

Protocol over which communication will happen over this endpoint. + * + * @return the protocol value. + */ + public Protocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Endpoint Communication Protocol + * + *

Protocol over which communication will happen over this endpoint. + * + * @param protocol the protocol value to set. + * @return the Endpoint object itself. + */ + public Endpoint withProtocol(Protocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the name property: Name of the Endpoint. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the Endpoint. + * + * @param name the name value to set. + * @return the Endpoint object itself. + */ + public Endpoint withName(String name) { + this.name = name; + return this; + } + + /** + * Get the target property: Application port inside the container. + * + * @return the target value. + */ + public Integer target() { + return this.target; + } + + /** + * Set the target property: Application port inside the container. + * + * @param target the target value to set. + * @return the Endpoint object itself. + */ + public Endpoint withTarget(Integer target) { + this.target = target; + return this; + } + + /** + * Get the published property: Port over which the application is exposed from container. + * + * @return the published value. + */ + public Integer published() { + return this.published; + } + + /** + * Set the published property: Port over which the application is exposed from container. + * + * @param published the published value to set. + * @return the Endpoint object itself. + */ + public Endpoint withPublished(Integer published) { + this.published = published; + return this; + } + + /** + * Get the hostIp property: Host IP over which the application is exposed from the container. + * + * @return the hostIp value. + */ + public String hostIp() { + return this.hostIp; + } + + /** + * Set the hostIp property: Host IP over which the application is exposed from the container. + * + * @param hostIp the hostIp value to set. + * @return the Endpoint object itself. + */ + public Endpoint withHostIp(String hostIp) { + this.hostIp = hostIp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 index f547c746ef2ba..9d8986323cd97 100644 --- 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 @@ -25,8 +25,7 @@ public class EndpointDeploymentPropertiesBase { private String description; /* - * ARM resource ID of the environment specification for the endpoint - * deployment. + * ARM resource ID of the environment specification for the endpoint deployment. */ @JsonProperty(value = "environmentId") private String environmentId; @@ -39,8 +38,7 @@ public class EndpointDeploymentPropertiesBase { private Map environmentVariables; /* - * Property dictionary. Properties can be added, but not removed or - * altered. + * Property dictionary. Properties can be added, but not removed or altered. */ @JsonProperty(value = "properties") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) 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 new file mode 100644 index 0000000000000..08174a58e13ec --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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; + + /** + * 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/EnvironmentContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java similarity index 71% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java index a197e16654b85..0256e791b224a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -/** An immutable client-side representation of EnvironmentContainerData. */ -public interface EnvironmentContainerData { +/** An immutable client-side representation of EnvironmentContainer. */ +public interface EnvironmentContainer { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface EnvironmentContainerData { * * @return the properties value. */ - EnvironmentContainerDetails properties(); + EnvironmentContainerProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface EnvironmentContainerData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner object. * * @return the inner object. */ - EnvironmentContainerDataInner innerModel(); + EnvironmentContainerInner innerModel(); - /** The entirety of the EnvironmentContainerData definition. */ + /** The entirety of the EnvironmentContainer definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The EnvironmentContainerData definition stages. */ + /** The EnvironmentContainer definition stages. */ interface DefinitionStages { - /** The first stage of the EnvironmentContainerData definition. */ + /** The first stage of the EnvironmentContainer definition. */ interface Blank extends WithParentResource { } - /** The stage of the EnvironmentContainerData definition allowing to specify parent resource. */ + /** The stage of the EnvironmentContainer definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -82,7 +82,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the EnvironmentContainerData definition allowing to specify properties. */ + /** The stage of the EnvironmentContainer definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -90,11 +90,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(EnvironmentContainerDetails properties); + WithCreate withProperties(EnvironmentContainerProperties properties); } /** - * The stage of the EnvironmentContainerData definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. + * 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 { /** @@ -102,7 +102,7 @@ interface WithCreate { * * @return the created resource. */ - EnvironmentContainerData create(); + EnvironmentContainer create(); /** * Executes the create request. @@ -110,24 +110,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - EnvironmentContainerData create(Context context); + EnvironmentContainer create(Context context); } } /** - * Begins update for the EnvironmentContainerData resource. + * Begins update for the EnvironmentContainer resource. * * @return the stage of resource update. */ - EnvironmentContainerData.Update update(); + EnvironmentContainer.Update update(); - /** The template for EnvironmentContainerData update. */ + /** The template for EnvironmentContainer update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - EnvironmentContainerData apply(); + EnvironmentContainer apply(); /** * Executes the update request. @@ -135,11 +135,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - EnvironmentContainerData apply(Context context); + EnvironmentContainer apply(Context context); } - /** The EnvironmentContainerData update stages. */ + /** The EnvironmentContainer update stages. */ interface UpdateStages { - /** The stage of the EnvironmentContainerData update allowing to specify properties. */ + /** The stage of the EnvironmentContainer update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -147,7 +147,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(EnvironmentContainerDetails properties); + Update withProperties(EnvironmentContainerProperties properties); } } /** @@ -155,7 +155,7 @@ interface WithProperties { * * @return the refreshed resource. */ - EnvironmentContainerData refresh(); + EnvironmentContainer refresh(); /** * Refreshes the resource to sync with Azure. @@ -163,5 +163,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - EnvironmentContainerData refresh(Context context); + EnvironmentContainer refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java similarity index 70% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java index fe093805a4b8e..372a5807a1af3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java @@ -9,31 +9,31 @@ /** Container for environment specification versions. */ @Fluent -public final class EnvironmentContainerDetails extends AssetContainer { +public final class EnvironmentContainerProperties extends AssetContainer { /** {@inheritDoc} */ @Override - public EnvironmentContainerDetails withIsArchived(Boolean isArchived) { + public EnvironmentContainerProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public EnvironmentContainerDetails withDescription(String description) { + public EnvironmentContainerProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public EnvironmentContainerDetails withProperties(Map properties) { + public EnvironmentContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public EnvironmentContainerDetails withTags(Map tags) { + public EnvironmentContainerProperties withTags(Map tags) { super.withTags(tags); return this; } 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 index e092db27c6b00..c433338fdf01e 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class EnvironmentContainerResourceArmPaginatedResult { /* - * The link to the next page of EnvironmentContainer objects. If null, - * there are no additional pages. + * The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class EnvironmentContainerResourceArmPaginatedResult { * An array of objects of type EnvironmentContainer. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no @@ -52,7 +51,7 @@ public EnvironmentContainerResourceArmPaginatedResult withNextLink(String nextLi * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the EnvironmentContainerResourceArmPaginatedResult object itself. */ - public EnvironmentContainerResourceArmPaginatedResult withValue(List value) { + public EnvironmentContainerResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 1ff0f06b34e2a..f7c072c0009a3 100644 --- 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 @@ -20,7 +20,7 @@ public interface EnvironmentContainers { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List environment containers. @@ -35,7 +35,7 @@ public interface EnvironmentContainers { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); /** @@ -75,7 +75,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container. */ - EnvironmentContainerData get(String resourceGroupName, String workspaceName, String name); + EnvironmentContainer get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -89,7 +89,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -101,7 +101,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - EnvironmentContainerData getById(String id); + EnvironmentContainer getById(String id); /** * Get container. @@ -113,7 +113,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete container. @@ -138,10 +138,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new EnvironmentContainerData resource. + * Begins definition for a new EnvironmentContainer resource. * * @param name resource name. - * @return the first stage of the new EnvironmentContainerData definition. + * @return the first stage of the new EnvironmentContainer definition. */ - EnvironmentContainerData.DefinitionStages.Blank define(String name); + EnvironmentContainer.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java new file mode 100644 index 0000000000000..21d401e9bd628 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; + +/** The EnvironmentVariable model. */ +@Fluent +public final class EnvironmentVariable { + /* + * Type of Environment Variable + * + * Type of the Environment Variable. Possible values are: local - For local variable + */ + @JsonProperty(value = "type") + private EnvironmentVariableType type; + + /* + * Value of the Environment variable + */ + @JsonProperty(value = "value") + private String value; + + /* + * Dictionary of + */ + @JsonIgnore private Map additionalProperties; + + /** + * Get the type property: Type of Environment Variable + * + *

Type of the Environment Variable. Possible values are: local - For local variable. + * + * @return the type value. + */ + public EnvironmentVariableType type() { + return this.type; + } + + /** + * Set the type property: Type of Environment Variable + * + *

Type of the Environment Variable. Possible values are: local - For local variable. + * + * @param type the type value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withType(EnvironmentVariableType type) { + this.type = type; + return this; + } + + /** + * Get the value property: Value of the Environment variable. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Value of the Environment variable. + * + * @param value the value value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the additionalProperties property: Dictionary of <any>. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Dictionary of <any>. + * + * @param additionalProperties the additionalProperties value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void withAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, 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/EnvironmentVariableType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java new file mode 100644 index 0000000000000..67514996d2c83 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 EnvironmentVariableType. */ +public final class EnvironmentVariableType extends ExpandableStringEnum { + /** Static value local for EnvironmentVariableType. */ + public static final EnvironmentVariableType LOCAL = fromString("local"); + + /** + * Creates or finds a EnvironmentVariableType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnvironmentVariableType. + */ + @JsonCreator + public static EnvironmentVariableType fromString(String name) { + return fromString(name, EnvironmentVariableType.class); + } + + /** + * Gets known EnvironmentVariableType values. + * + * @return known EnvironmentVariableType values. + */ + public static Collection values() { + return values(EnvironmentVariableType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java index 088be7f710eff..8c72da86c8b0e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -/** An immutable client-side representation of EnvironmentVersionData. */ -public interface EnvironmentVersionData { +/** An immutable client-side representation of EnvironmentVersion. */ +public interface EnvironmentVersion { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface EnvironmentVersionData { * * @return the properties value. */ - EnvironmentVersionDetails properties(); + EnvironmentVersionProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface EnvironmentVersionData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner object. * * @return the inner object. */ - EnvironmentVersionDataInner innerModel(); + EnvironmentVersionInner innerModel(); - /** The entirety of the EnvironmentVersionData definition. */ + /** The entirety of the EnvironmentVersion definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The EnvironmentVersionData definition stages. */ + /** The EnvironmentVersion definition stages. */ interface DefinitionStages { - /** The first stage of the EnvironmentVersionData definition. */ + /** The first stage of the EnvironmentVersion definition. */ interface Blank extends WithParentResource { } - /** The stage of the EnvironmentVersionData definition allowing to specify parent resource. */ + /** The stage of the EnvironmentVersion definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, name. @@ -83,7 +83,7 @@ interface WithParentResource { */ WithProperties withExistingEnvironment(String resourceGroupName, String workspaceName, String name); } - /** The stage of the EnvironmentVersionData definition allowing to specify properties. */ + /** The stage of the EnvironmentVersion definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -91,10 +91,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(EnvironmentVersionDetails properties); + WithCreate withProperties(EnvironmentVersionProperties properties); } /** - * The stage of the EnvironmentVersionData definition which contains all the minimum required properties for the + * 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 { @@ -103,7 +103,7 @@ interface WithCreate { * * @return the created resource. */ - EnvironmentVersionData create(); + EnvironmentVersion create(); /** * Executes the create request. @@ -111,24 +111,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - EnvironmentVersionData create(Context context); + EnvironmentVersion create(Context context); } } /** - * Begins update for the EnvironmentVersionData resource. + * Begins update for the EnvironmentVersion resource. * * @return the stage of resource update. */ - EnvironmentVersionData.Update update(); + EnvironmentVersion.Update update(); - /** The template for EnvironmentVersionData update. */ + /** The template for EnvironmentVersion update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - EnvironmentVersionData apply(); + EnvironmentVersion apply(); /** * Executes the update request. @@ -136,11 +136,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - EnvironmentVersionData apply(Context context); + EnvironmentVersion apply(Context context); } - /** The EnvironmentVersionData update stages. */ + /** The EnvironmentVersion update stages. */ interface UpdateStages { - /** The stage of the EnvironmentVersionData update allowing to specify properties. */ + /** The stage of the EnvironmentVersion update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -148,7 +148,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(EnvironmentVersionDetails properties); + Update withProperties(EnvironmentVersionProperties properties); } } /** @@ -156,7 +156,7 @@ interface WithProperties { * * @return the refreshed resource. */ - EnvironmentVersionData refresh(); + EnvironmentVersion refresh(); /** * Refreshes the resource to sync with Azure. @@ -164,5 +164,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - EnvironmentVersionData refresh(Context context); + EnvironmentVersion refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java similarity index 80% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java index 3609c2a645761..476e9aa558a86 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java @@ -10,7 +10,7 @@ /** Environment version details. */ @Fluent -public final class EnvironmentVersionDetails extends AssetBase { +public final class EnvironmentVersionProperties extends AssetBase { /* * Configuration settings for Docker build context. */ @@ -18,8 +18,8 @@ public final class EnvironmentVersionDetails extends AssetBase { private BuildContext build; /* - * Standard configuration file used by Conda that lets you install any kind - * of package, including Python, R, and C/C++ packages. + * Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and + * C/C++ packages. * @@ -28,11 +28,8 @@ public final class EnvironmentVersionDetails extends AssetBase { private String condaFile; /* - * Environment type is either user managed or curated by the Azure ML - * service - * + * Environment type is either user managed or curated by the Azure ML service + * */ @JsonProperty(value = "environmentType", access = JsonProperty.Access.WRITE_ONLY) private EnvironmentType environmentType; @@ -72,9 +69,9 @@ public BuildContext build() { * Set the build property: Configuration settings for Docker build context. * * @param build the build value to set. - * @return the EnvironmentVersionDetails object itself. + * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionDetails withBuild(BuildContext build) { + public EnvironmentVersionProperties withBuild(BuildContext build) { this.build = build; return this; } @@ -98,9 +95,9 @@ public String condaFile() { * />. * * @param condaFile the condaFile value to set. - * @return the EnvironmentVersionDetails object itself. + * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionDetails withCondaFile(String condaFile) { + public EnvironmentVersionProperties withCondaFile(String condaFile) { this.condaFile = condaFile; return this; } @@ -134,9 +131,9 @@ public String image() { * />. * * @param image the image value to set. - * @return the EnvironmentVersionDetails object itself. + * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionDetails withImage(String image) { + public EnvironmentVersionProperties withImage(String image) { this.image = image; return this; } @@ -154,9 +151,9 @@ public InferenceContainerProperties inferenceConfig() { * Set the inferenceConfig property: Defines configuration specific to inference. * * @param inferenceConfig the inferenceConfig value to set. - * @return the EnvironmentVersionDetails object itself. + * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionDetails withInferenceConfig(InferenceContainerProperties inferenceConfig) { + public EnvironmentVersionProperties withInferenceConfig(InferenceContainerProperties inferenceConfig) { this.inferenceConfig = inferenceConfig; return this; } @@ -174,44 +171,44 @@ public OperatingSystemType osType() { * Set the osType property: The OS type of the environment. * * @param osType the osType value to set. - * @return the EnvironmentVersionDetails object itself. + * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionDetails withOsType(OperatingSystemType osType) { + public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { this.osType = osType; return this; } /** {@inheritDoc} */ @Override - public EnvironmentVersionDetails withIsAnonymous(Boolean isAnonymous) { + public EnvironmentVersionProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } /** {@inheritDoc} */ @Override - public EnvironmentVersionDetails withIsArchived(Boolean isArchived) { + public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public EnvironmentVersionDetails withDescription(String description) { + public EnvironmentVersionProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public EnvironmentVersionDetails withProperties(Map properties) { + public EnvironmentVersionProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public EnvironmentVersionDetails withTags(Map tags) { + public EnvironmentVersionProperties withTags(Map tags) { super.withTags(tags); return this; } 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 index 1423e6bfe747f..6b2226ed05904 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class EnvironmentVersionResourceArmPaginatedResult { /* - * The link to the next page of EnvironmentVersion objects. If null, there - * are no additional pages. + * The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class EnvironmentVersionResourceArmPaginatedResult { * An array of objects of type EnvironmentVersion. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no @@ -52,7 +51,7 @@ public EnvironmentVersionResourceArmPaginatedResult withNextLink(String nextLink * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the EnvironmentVersionResourceArmPaginatedResult object itself. */ - public EnvironmentVersionResourceArmPaginatedResult withValue(List value) { + public EnvironmentVersionResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index e35c0d05eb3a6..fbcca9fcb979f 100644 --- 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 @@ -21,7 +21,7 @@ public interface EnvironmentVersions { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List versions. @@ -39,7 +39,7 @@ public interface EnvironmentVersions { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -90,7 +90,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version. */ - EnvironmentVersionData get(String resourceGroupName, String workspaceName, String name, String version); + EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -105,7 +105,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -117,7 +117,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - EnvironmentVersionData getById(String id); + EnvironmentVersion getById(String id); /** * Get version. @@ -129,7 +129,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete version. @@ -154,10 +154,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new EnvironmentVersionData resource. + * Begins definition for a new EnvironmentVersion resource. * * @param name resource name. - * @return the first stage of the new EnvironmentVersionData definition. + * @return the first stage of the new EnvironmentVersion definition. */ - EnvironmentVersionData.DefinitionStages.Blank define(String name); + 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 index d6d2ed9180c3c..e618bf66ea5d1 100644 --- 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 @@ -12,25 +12,33 @@ @Fluent public final class EstimatedVMPrice { /* - * Retail price The price charged for using the VM. + * 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. + * OS type + * + * Operating system type used by the VM. */ @JsonProperty(value = "osType", required = true) private VMPriceOSType osType; /* - * VM tier The type of the VM. + * VM tier + * + * The type of the VM. */ @JsonProperty(value = "vmTier", required = true) private VMTier vmTier; /** - * Get the retailPrice property: Retail price The price charged for using the VM. + * Get the retailPrice property: Retail price + * + *

The price charged for using the VM. * * @return the retailPrice value. */ @@ -39,7 +47,9 @@ public double retailPrice() { } /** - * Set the retailPrice property: Retail price The price charged for using the VM. + * 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. @@ -50,7 +60,9 @@ public EstimatedVMPrice withRetailPrice(double retailPrice) { } /** - * Get the osType property: OS type Operating system type used by the VM. + * Get the osType property: OS type + * + *

Operating system type used by the VM. * * @return the osType value. */ @@ -59,7 +71,9 @@ public VMPriceOSType osType() { } /** - * Set the osType property: OS type Operating system type used by the VM. + * 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. @@ -70,7 +84,9 @@ public EstimatedVMPrice withOsType(VMPriceOSType osType) { } /** - * Get the vmTier property: VM tier The type of the VM. + * Get the vmTier property: VM tier + * + *

The type of the VM. * * @return the vmTier value. */ @@ -79,7 +95,9 @@ public VMTier vmTier() { } /** - * Set the vmTier property: VM tier The type of the VM. + * Set the vmTier property: VM tier + * + *

The type of the VM. * * @param vmTier the vmTier value to set. * @return the EstimatedVMPrice object itself. 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 index d56a96c2434bb..f4e1d04c176a6 100644 --- 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 @@ -13,29 +13,33 @@ @Fluent public final class EstimatedVMPrices { /* - * Billing currency Three lettered code specifying the currency of the VM - * price. Example: USD + * 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 + * 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. + * List of estimated VM prices. + * + * The list of estimated prices for using a VM of a particular OS type, tier, etc. */ @JsonProperty(value = "values", required = true) private List values; /** - * Get the billingCurrency property: Billing currency Three lettered code specifying the currency of the VM price. - * Example: USD. + * Get the billingCurrency property: Billing currency + * + *

Three lettered code specifying the currency of the VM price. Example: USD. * * @return the billingCurrency value. */ @@ -44,8 +48,9 @@ public BillingCurrency billingCurrency() { } /** - * Set the billingCurrency property: Billing currency Three lettered code specifying the currency of the VM price. - * Example: USD. + * 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. @@ -56,8 +61,9 @@ public EstimatedVMPrices withBillingCurrency(BillingCurrency billingCurrency) { } /** - * Get the unitOfMeasure property: Unit of time measure The unit of time measurement for the specified VM price. - * Example: OneHour. + * Get the unitOfMeasure property: Unit of time measure + * + *

The unit of time measurement for the specified VM price. Example: OneHour. * * @return the unitOfMeasure value. */ @@ -66,8 +72,9 @@ public UnitOfMeasure unitOfMeasure() { } /** - * Set the unitOfMeasure property: Unit of time measure The unit of time measurement for the specified VM price. - * Example: OneHour. + * 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. @@ -78,8 +85,9 @@ public EstimatedVMPrices withUnitOfMeasure(UnitOfMeasure unitOfMeasure) { } /** - * 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. + * 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. */ @@ -88,8 +96,9 @@ public List 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. + * 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportFormatType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportFormatType.java new file mode 100644 index 0000000000000..aaef22a3d0fc4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportFormatType.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 ExportFormatType. */ +public final class ExportFormatType extends ExpandableStringEnum { + /** Static value Dataset for ExportFormatType. */ + public static final ExportFormatType DATASET = fromString("Dataset"); + + /** Static value Coco for ExportFormatType. */ + public static final ExportFormatType COCO = fromString("Coco"); + + /** Static value CSV for ExportFormatType. */ + public static final ExportFormatType CSV = fromString("CSV"); + + /** + * Creates or finds a ExportFormatType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExportFormatType. + */ + @JsonCreator + public static ExportFormatType fromString(String name) { + return fromString(name, ExportFormatType.class); + } + + /** + * Gets known ExportFormatType values. + * + * @return known ExportFormatType values. + */ + public static Collection values() { + return values(ExportFormatType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportSummary.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportSummary.java new file mode 100644 index 0000000000000..4978cbaefd1c9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportSummary.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All 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.ExportSummaryInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of ExportSummary. */ +public interface ExportSummary { + /** + * Gets the endDateTime property: The time when the export was completed. + * + * @return the endDateTime value. + */ + OffsetDateTime endDateTime(); + + /** + * Gets the exportedRowCount property: The total number of labeled datapoints exported. + * + * @return the exportedRowCount value. + */ + Long exportedRowCount(); + + /** + * Gets the labelingJobId property: Name and identifier of the job containing exported labels. + * + * @return the labelingJobId value. + */ + String labelingJobId(); + + /** + * Gets the startDateTime property: The time when the export was requested. + * + * @return the startDateTime value. + */ + OffsetDateTime startDateTime(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner object. + * + * @return the inner object. + */ + ExportSummaryInner innerModel(); +} 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 index 6fb8de9dc3cdb..6480b59f58c1c 100644 --- 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 @@ -15,18 +15,6 @@ @JsonTypeName("Forecasting") @Fluent public final class Forecasting extends AutoMLVertical { - /* - * Allowed models for forecasting task. - */ - @JsonProperty(value = "allowedModels") - private List allowedModels; - - /* - * Blocked models for forecasting task. - */ - @JsonProperty(value = "blockedModels") - private List blockedModels; - /* * Forecasting task specific inputs. */ @@ -40,10 +28,16 @@ public final class Forecasting extends AutoMLVertical { private ForecastingPrimaryMetrics primaryMetric; /* - * Data inputs for AutoMLJob. + * Inputs for training phase for an AutoML Job. */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; + @JsonProperty(value = "trainingSettings") + private ForecastingTrainingSettings trainingSettings; + + /* + * Columns to use for CVSplit data. + */ + @JsonProperty(value = "cvSplitColumnNames") + private List cvSplitColumnNames; /* * Featurization inputs needed for AutoML job. @@ -58,50 +52,46 @@ public final class Forecasting extends AutoMLVertical { private TableVerticalLimitSettings limitSettings; /* - * Inputs for training phase for an AutoML Job. + * Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. */ - @JsonProperty(value = "trainingSettings") - private TrainingSettings trainingSettings; + @JsonProperty(value = "nCrossValidations") + private NCrossValidations nCrossValidations; - /** - * Get the allowedModels property: Allowed models for forecasting task. - * - * @return the allowedModels value. + /* + * Test data input. */ - public List allowedModels() { - return this.allowedModels; - } + @JsonProperty(value = "testData") + private MLTableJobInput testData; - /** - * Set the allowedModels property: Allowed models for forecasting task. - * - * @param allowedModels the allowedModels value to set. - * @return the Forecasting object itself. + /* + * 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. */ - public Forecasting withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } + @JsonProperty(value = "testDataSize") + private Double testDataSize; - /** - * Get the blockedModels property: Blocked models for forecasting task. - * - * @return the blockedModels value. + /* + * Validation data inputs. */ - public List blockedModels() { - return this.blockedModels; - } + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; - /** - * Set the blockedModels property: Blocked models for forecasting task. - * - * @param blockedModels the blockedModels value to set. - * @return the Forecasting object itself. + /* + * 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. */ - public Forecasting withBlockedModels(List blockedModels) { - this.blockedModels = blockedModels; - return this; - } + @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; /** * Get the forecastingSettings property: Forecasting task specific inputs. @@ -144,22 +134,42 @@ public Forecasting withPrimaryMetric(ForecastingPrimaryMetrics primaryMetric) { } /** - * Get the dataSettings property: Data inputs for AutoMLJob. + * 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 dataSettings value. + * @return the cvSplitColumnNames value. */ - public TableVerticalDataSettings dataSettings() { - return this.dataSettings; + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; } /** - * Set the dataSettings property: Data inputs for AutoMLJob. + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @param dataSettings the dataSettings value to set. + * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Forecasting object itself. */ - public Forecasting withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; + public Forecasting withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; return this; } @@ -204,22 +214,130 @@ public Forecasting withLimitSettings(TableVerticalLimitSettings limitSettings) { } /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when + * validation dataset is not provided. * - * @return the trainingSettings value. + * @return the nCrossValidations value. */ - public TrainingSettings trainingSettings() { - return this.trainingSettings; + public NCrossValidations nCrossValidations() { + return this.nCrossValidations; } /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when + * validation dataset is not provided. * - * @param trainingSettings the trainingSettings value to set. + * @param nCrossValidations the nCrossValidations value to set. * @return the Forecasting object itself. */ - public Forecasting withTrainingSettings(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; + 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; } @@ -230,6 +348,20 @@ public Forecasting withLogVerbosity(LogVerbosity 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. * @@ -241,8 +373,8 @@ public void validate() { if (forecastingSettings() != null) { forecastingSettings().validate(); } - if (dataSettings() != null) { - dataSettings().validate(); + if (trainingSettings() != null) { + trainingSettings().validate(); } if (featurizationSettings() != null) { featurizationSettings().validate(); @@ -250,8 +382,14 @@ public void validate() { if (limitSettings() != null) { limitSettings().validate(); } - if (trainingSettings() != null) { - trainingSettings().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/ForecastingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java index 69b4eac619021..e053c68fbae98 100644 --- 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 @@ -13,17 +13,14 @@ 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'. + * 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 + * 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") @@ -42,16 +39,14 @@ public final class ForecastingSettings { 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. + * 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. + * 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") @@ -64,11 +59,9 @@ public final class ForecastingSettings { 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". + * 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; @@ -80,25 +73,22 @@ public final class ForecastingSettings { private TargetLags targetLags; /* - * The number of past periods used to create a rolling window average of - * the target column. + * 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. + * 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. + * 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; 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 new file mode 100644 index 0000000000000..c8e8d08a6cf4d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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/HdfsDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.java index 78657ac863ea2..1be9d04713bd3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.java @@ -15,10 +15,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("Hdfs") @Fluent -public final class HdfsDatastore extends DatastoreDetails { +public final class HdfsDatastore extends DatastoreProperties { /* - * The TLS cert of the HDFS server. Needs to be a base64 encoded string. - * Required if "Https" protocol is selected. + * The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. */ @JsonProperty(value = "hdfsServerCertificate") private String hdfsServerCertificate; 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 index e04ce968ccc4a..2b21a0e6aedab 100644 --- 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 @@ -11,8 +11,7 @@ @Fluent public final class IdentityForCmk { /* - * The ArmId of the user assigned identity that will be used to access the - * customer managed key vault + * The ArmId of the user assigned identity that will be used to access the customer managed key vault */ @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java new file mode 100644 index 0000000000000..6111f349c98f3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Stops compute instance after user defined period of inactivity. */ +@Fluent +public final class IdleShutdownSetting { + /* + * Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + */ + @JsonProperty(value = "idleTimeBeforeShutdown") + private String idleTimeBeforeShutdown; + + /** + * Get the idleTimeBeforeShutdown property: Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + * + * @return the idleTimeBeforeShutdown value. + */ + public String idleTimeBeforeShutdown() { + return this.idleTimeBeforeShutdown; + } + + /** + * Set the idleTimeBeforeShutdown property: Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + * + * @param idleTimeBeforeShutdown the idleTimeBeforeShutdown value to set. + * @return the IdleShutdownSetting object itself. + */ + public IdleShutdownSetting withIdleTimeBeforeShutdown(String idleTimeBeforeShutdown) { + this.idleTimeBeforeShutdown = idleTimeBeforeShutdown; + 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/Image.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java new file mode 100644 index 0000000000000..77d29ae534835 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; + +/** The Image model. */ +@Fluent +public final class Image { + /* + * Type of the image + * + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images + */ + @JsonProperty(value = "type") + private ImageType type; + + /* + * Image reference URL + */ + @JsonProperty(value = "reference") + private String reference; + + /* + * Dictionary of + */ + @JsonIgnore private Map additionalProperties; + + /** + * Get the type property: Type of the image + * + *

Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + * + * @return the type value. + */ + public ImageType type() { + return this.type; + } + + /** + * Set the type property: Type of the image + * + *

Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + * + * @param type the type value to set. + * @return the Image object itself. + */ + public Image withType(ImageType type) { + this.type = type; + return this; + } + + /** + * Get the reference property: Image reference URL. + * + * @return the reference value. + */ + public String reference() { + return this.reference; + } + + /** + * Set the reference property: Image reference URL. + * + * @param reference the reference value to set. + * @return the Image object itself. + */ + public Image withReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Get the additionalProperties property: Dictionary of <any>. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Dictionary of <any>. + * + * @param additionalProperties the additionalProperties value to set. + * @return the Image object itself. + */ + public Image withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void withAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, 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/ImageAnnotationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageAnnotationType.java new file mode 100644 index 0000000000000..04eed47433d0d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageAnnotationType.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 ImageAnnotationType. */ +public final class ImageAnnotationType extends ExpandableStringEnum { + /** Static value Classification for ImageAnnotationType. */ + public static final ImageAnnotationType CLASSIFICATION = fromString("Classification"); + + /** Static value BoundingBox for ImageAnnotationType. */ + public static final ImageAnnotationType BOUNDING_BOX = fromString("BoundingBox"); + + /** Static value InstanceSegmentation for ImageAnnotationType. */ + public static final ImageAnnotationType INSTANCE_SEGMENTATION = fromString("InstanceSegmentation"); + + /** + * Creates or finds a ImageAnnotationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImageAnnotationType. + */ + @JsonCreator + public static ImageAnnotationType fromString(String name) { + return fromString(name, ImageAnnotationType.class); + } + + /** + * Gets known ImageAnnotationType values. + * + * @return known ImageAnnotationType values. + */ + public static Collection values() { + return values(ImageAnnotationType.class); + } +} 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 index 752eb27aa901b..19dddb9421caa 100644 --- 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 @@ -32,19 +32,11 @@ public final class ImageClassification extends AutoMLVertical { private ImageModelSettingsClassification modelSettings; /* - * Search space for sampling different combinations of models and their - * hyperparameters. + * Search space for sampling different combinations of models and their hyperparameters. */ @JsonProperty(value = "searchSpace") private List searchSpace; - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - /* * [Required] Limit settings for the AutoML job. */ @@ -57,6 +49,20 @@ public final class ImageClassification extends AutoMLVertical { @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; + /** * Get the primaryMetric property: Primary metric to optimize for this task. * @@ -119,28 +125,6 @@ public ImageClassification withSearchSpace(List e.validate()); } - if (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSettings in model ImageClassification")); - } else { - dataSettings().validate(); - } if (limitSettings() == null) { throw LOGGER .logExceptionAsError( @@ -221,6 +253,9 @@ public void 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 index 2c7c7d78b6783..85456129386b6 100644 --- 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 @@ -18,8 +18,7 @@ public class ImageClassificationBase extends ImageVertical { private ImageModelSettingsClassification modelSettings; /* - * Search space for sampling different combinations of models and their - * hyperparameters. + * Search space for sampling different combinations of models and their hyperparameters. */ @JsonProperty(value = "searchSpace") private List searchSpace; @@ -68,22 +67,29 @@ public ImageClassificationBase withSearchSpace(List searchSpace; - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - /* * [Required] Limit settings for the AutoML job. */ @@ -57,6 +49,20 @@ public final class ImageClassificationMultilabel extends AutoMLVertical { @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; + /** * Get the primaryMetric property: Primary metric to optimize for this task. * @@ -120,28 +126,6 @@ public ImageClassificationMultilabel withSearchSpace( return this; } - /** - * Get the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @return the dataSettings value. - */ - public ImageVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @param dataSettings the dataSettings value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withDataSettings(ImageVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - return this; - } - /** * Get the limitSettings property: [Required] Limit settings for the AutoML job. * @@ -182,6 +166,48 @@ public ImageClassificationMultilabel withSweepSettings(ImageSweepSettings sweepS 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) { @@ -189,6 +215,20 @@ public ImageClassificationMultilabel withLogVerbosity(LogVerbosity 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. * @@ -203,14 +243,6 @@ public void validate() { if (searchSpace() != null) { searchSpace().forEach(e -> e.validate()); } - if (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSettings in model ImageClassificationMultilabel")); - } else { - dataSettings().validate(); - } if (limitSettings() == null) { throw LOGGER .logExceptionAsError( @@ -222,6 +254,9 @@ public void 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 index c0ba2ca2140b2..a52c3a43b5e59 100644 --- 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 @@ -32,19 +32,11 @@ public final class ImageInstanceSegmentation extends AutoMLVertical { private ImageModelSettingsObjectDetection modelSettings; /* - * Search space for sampling different combinations of models and their - * hyperparameters. + * Search space for sampling different combinations of models and their hyperparameters. */ @JsonProperty(value = "searchSpace") private List searchSpace; - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - /* * [Required] Limit settings for the AutoML job. */ @@ -57,6 +49,20 @@ public final class ImageInstanceSegmentation extends AutoMLVertical { @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; + /** * Get the primaryMetric property: Primary metric to optimize for this task. * @@ -119,28 +125,6 @@ public ImageInstanceSegmentation withSearchSpace(List e.validate()); } - if (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSettings in model ImageInstanceSegmentation")); - } else { - dataSettings().validate(); - } if (limitSettings() == null) { throw LOGGER .logExceptionAsError( @@ -221,6 +253,9 @@ public void 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/ImageModelDistributionSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java index 7632a871cbdc5..a84aca7f535e0 100644 --- 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 @@ -32,15 +32,13 @@ public class ImageModelDistributionSettings { private String augmentations; /* - * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in - * the range [0, 1]. + * 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]. + * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. */ @JsonProperty(value = "beta2") private String beta2; @@ -58,16 +56,14 @@ public class ImageModelDistributionSettings { private String earlyStopping; /* - * Minimum number of epochs or validation evaluations to wait before - * primary metric improvement + * 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 + * 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") @@ -80,19 +76,15 @@ public class ImageModelDistributionSettings { private String enableOnnxNormalization; /* - * Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. + * 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. + * 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; @@ -100,10 +92,8 @@ public class ImageModelDistributionSettings { /* * 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. + * 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; @@ -122,16 +112,14 @@ public class ImageModelDistributionSettings { /* * Name of the model to use for training. - * For more information on the available models please visit the official - * documentation: + * 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]. + * Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. */ @JsonProperty(value = "momentum") private String momentum; @@ -167,24 +155,13 @@ public class ImageModelDistributionSettings { private String randomSeed; /* - * If validation data is not defined, this specifies the split ratio for - * splitting - * train data into random train and validation subsets. Must be a float in - * the range [0, 1]. - */ - @JsonProperty(value = "splitRatio") - private String splitRatio; - - /* - * Value of gamma when learning rate scheduler is 'step'. Must be a float - * in the range [0, 1]. + * 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. + * Value of step size when learning rate scheduler is 'step'. Must be a positive integer. */ @JsonProperty(value = "stepLRStepSize") private String stepLRStepSize; @@ -202,22 +179,19 @@ public class ImageModelDistributionSettings { private String validationBatchSize; /* - * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. + * 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. + * 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]. + * 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; @@ -666,28 +640,6 @@ public ImageModelDistributionSettings withRandomSeed(String randomSeed) { return this; } - /** - * Get the splitRatio property: If validation data is not defined, this specifies the split ratio for splitting - * train data into random train and validation subsets. Must be a float in the range [0, 1]. - * - * @return the splitRatio value. - */ - public String splitRatio() { - return this.splitRatio; - } - - /** - * Set the splitRatio property: If validation data is not defined, this specifies the split ratio for splitting - * train data into random train and validation subsets. Must be a float in the range [0, 1]. - * - * @param splitRatio the splitRatio value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withSplitRatio(String splitRatio) { - this.splitRatio = splitRatio; - return this; - } - /** * Get the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range * [0, 1]. 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 index 0bbfd9392f0f6..86542eb93d9c1 100644 --- 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 @@ -18,30 +18,26 @@ @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. + * 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. + * 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. + * 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. + * 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; @@ -281,13 +277,6 @@ public ImageModelDistributionSettingsClassification withRandomSeed(String random return this; } - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withSplitRatio(String splitRatio) { - super.withSplitRatio(splitRatio); - return this; - } - /** {@inheritDoc} */ @Override public ImageModelDistributionSettingsClassification withStepLRGamma(String stepLRGamma) { 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 index 4a1d8df91b977..641338863bf72 100644 --- 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 @@ -18,16 +18,14 @@ @Fluent public final class ImageModelDistributionSettingsObjectDetection extends ImageModelDistributionSettings { /* - * Maximum number of detections per image, for all classes. Must be a - * positive integer. + * 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 + * During inference, only return proposals with a classification score greater than * BoxScoreThreshold. Must be a float in the range[0, 1]. */ @JsonProperty(value = "boxScoreThreshold") @@ -42,20 +40,16 @@ public final class ImageModelDistributionSettingsObjectDetection extends ImageMo 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. + * 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. + * 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") @@ -78,33 +72,28 @@ public final class ImageModelDistributionSettingsObjectDetection extends ImageMo private String multiScale; /* - * IOU threshold used during inference in NMS post processing. Must be - * float in the range [0, 1]. + * 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. + * 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). + * 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. + * 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 @@ -113,15 +102,13 @@ public final class ImageModelDistributionSettingsObjectDetection extends ImageMo private String tilePredictionsNmsThreshold; /* - * IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. + * 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'. + * Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. */ @JsonProperty(value = "validationMetricType") private String validationMetricType; @@ -570,13 +557,6 @@ public ImageModelDistributionSettingsObjectDetection withRandomSeed(String rando return this; } - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withSplitRatio(String splitRatio) { - super.withSplitRatio(splitRatio); - return this; - } - /** {@inheritDoc} */ @Override public ImageModelDistributionSettingsObjectDetection withStepLRGamma(String stepLRGamma) { 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 index 29c1d42ca455c..b11ad16be96bf 100644 --- 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 @@ -32,34 +32,17 @@ public class ImageModelSettings { private String augmentations; /* - * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in - * the range [0, 1]. + * 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]. + * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. */ @JsonProperty(value = "beta2") private Float beta2; - /* - * FileDataset id for pretrained checkpoint(s) for incremental training. - * Make sure to pass CheckpointFilename along with CheckpointDatasetId. - */ - @JsonProperty(value = "checkpointDatasetId") - private String checkpointDatasetId; - - /* - * The pretrained checkpoint filename in FileDataset for incremental - * training. - * Make sure to pass CheckpointDatasetId along with CheckpointFilename. - */ - @JsonProperty(value = "checkpointFilename") - private String checkpointFilename; - /* * Frequency to store model checkpoints. Must be a positive integer. */ @@ -67,8 +50,13 @@ public class ImageModelSettings { private Integer checkpointFrequency; /* - * The id of a previous run that has a pretrained checkpoint for - * incremental training. + * 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; @@ -86,16 +74,14 @@ public class ImageModelSettings { private Boolean earlyStopping; /* - * Minimum number of epochs or validation evaluations to wait before - * primary metric improvement + * 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 + * 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") @@ -108,19 +94,15 @@ public class ImageModelSettings { private Boolean enableOnnxNormalization; /* - * Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. + * 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. + * 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; @@ -128,10 +110,8 @@ public class ImageModelSettings { /* * 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. + * 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; @@ -150,16 +130,14 @@ public class ImageModelSettings { /* * Name of the model to use for training. - * For more information on the available models please visit the official - * documentation: + * 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]. + * Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. */ @JsonProperty(value = "momentum") private Float momentum; @@ -195,24 +173,13 @@ public class ImageModelSettings { private Integer randomSeed; /* - * If validation data is not defined, this specifies the split ratio for - * splitting - * train data into random train and validation subsets. Must be a float in - * the range [0, 1]. - */ - @JsonProperty(value = "splitRatio") - private Float splitRatio; - - /* - * Value of gamma when learning rate scheduler is 'step'. Must be a float - * in the range [0, 1]. + * 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. + * Value of step size when learning rate scheduler is 'step'. Must be a positive integer. */ @JsonProperty(value = "stepLRStepSize") private Integer stepLRStepSize; @@ -230,22 +197,19 @@ public class ImageModelSettings { private Integer validationBatchSize; /* - * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. + * 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. + * 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]. + * 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; @@ -355,66 +319,42 @@ public ImageModelSettings withBeta2(Float beta2) { } /** - * Get the checkpointDatasetId property: FileDataset id for pretrained checkpoint(s) for incremental training. Make - * sure to pass CheckpointFilename along with CheckpointDatasetId. - * - * @return the checkpointDatasetId value. - */ - public String checkpointDatasetId() { - return this.checkpointDatasetId; - } - - /** - * Set the checkpointDatasetId property: FileDataset id for pretrained checkpoint(s) for incremental training. Make - * sure to pass CheckpointFilename along with CheckpointDatasetId. - * - * @param checkpointDatasetId the checkpointDatasetId value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withCheckpointDatasetId(String checkpointDatasetId) { - this.checkpointDatasetId = checkpointDatasetId; - return this; - } - - /** - * Get the checkpointFilename property: The pretrained checkpoint filename in FileDataset for incremental training. - * Make sure to pass CheckpointDatasetId along with CheckpointFilename. + * Get the checkpointFrequency property: Frequency to store model checkpoints. Must be a positive integer. * - * @return the checkpointFilename value. + * @return the checkpointFrequency value. */ - public String checkpointFilename() { - return this.checkpointFilename; + public Integer checkpointFrequency() { + return this.checkpointFrequency; } /** - * Set the checkpointFilename property: The pretrained checkpoint filename in FileDataset for incremental training. - * Make sure to pass CheckpointDatasetId along with CheckpointFilename. + * Set the checkpointFrequency property: Frequency to store model checkpoints. Must be a positive integer. * - * @param checkpointFilename the checkpointFilename value to set. + * @param checkpointFrequency the checkpointFrequency value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withCheckpointFilename(String checkpointFilename) { - this.checkpointFilename = checkpointFilename; + public ImageModelSettings withCheckpointFrequency(Integer checkpointFrequency) { + this.checkpointFrequency = checkpointFrequency; return this; } /** - * Get the checkpointFrequency property: Frequency to store model checkpoints. Must be a positive integer. + * Get the checkpointModel property: The pretrained checkpoint model for incremental training. * - * @return the checkpointFrequency value. + * @return the checkpointModel value. */ - public Integer checkpointFrequency() { - return this.checkpointFrequency; + public MLFlowModelJobInput checkpointModel() { + return this.checkpointModel; } /** - * Set the checkpointFrequency property: Frequency to store model checkpoints. Must be a positive integer. + * Set the checkpointModel property: The pretrained checkpoint model for incremental training. * - * @param checkpointFrequency the checkpointFrequency value to set. + * @param checkpointModel the checkpointModel value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withCheckpointFrequency(Integer checkpointFrequency) { - this.checkpointFrequency = checkpointFrequency; + public ImageModelSettings withCheckpointModel(MLFlowModelJobInput checkpointModel) { + this.checkpointModel = checkpointModel; return this; } @@ -800,28 +740,6 @@ public ImageModelSettings withRandomSeed(Integer randomSeed) { return this; } - /** - * Get the splitRatio property: If validation data is not defined, this specifies the split ratio for splitting - * train data into random train and validation subsets. Must be a float in the range [0, 1]. - * - * @return the splitRatio value. - */ - public Float splitRatio() { - return this.splitRatio; - } - - /** - * Set the splitRatio property: If validation data is not defined, this specifies the split ratio for splitting - * train data into random train and validation subsets. Must be a float in the range [0, 1]. - * - * @param splitRatio the splitRatio value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withSplitRatio(Float splitRatio) { - this.splitRatio = splitRatio; - return this; - } - /** * Get the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range * [0, 1]. @@ -978,5 +896,8 @@ public ImageModelSettings withWeightDecay(Float weightDecay) { * @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 index 38153e69f12d4..9795958073247 100644 --- 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 @@ -14,30 +14,26 @@ @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. + * 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. + * 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. + * 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. + * 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; @@ -167,22 +163,15 @@ public ImageModelSettingsClassification withBeta2(Float beta2) { /** {@inheritDoc} */ @Override - public ImageModelSettingsClassification withCheckpointDatasetId(String checkpointDatasetId) { - super.withCheckpointDatasetId(checkpointDatasetId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsClassification withCheckpointFilename(String checkpointFilename) { - super.withCheckpointFilename(checkpointFilename); + public ImageModelSettingsClassification withCheckpointFrequency(Integer checkpointFrequency) { + super.withCheckpointFrequency(checkpointFrequency); return this; } /** {@inheritDoc} */ @Override - public ImageModelSettingsClassification withCheckpointFrequency(Integer checkpointFrequency) { - super.withCheckpointFrequency(checkpointFrequency); + public ImageModelSettingsClassification withCheckpointModel(MLFlowModelJobInput checkpointModel) { + super.withCheckpointModel(checkpointModel); return this; } @@ -312,13 +301,6 @@ public ImageModelSettingsClassification withRandomSeed(Integer randomSeed) { return this; } - /** {@inheritDoc} */ - @Override - public ImageModelSettingsClassification withSplitRatio(Float splitRatio) { - super.withSplitRatio(splitRatio); - return this; - } - /** {@inheritDoc} */ @Override public ImageModelSettingsClassification withStepLRGamma(Float stepLRGamma) { 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 index 9d79afb1992aa..2e55fa8d4f652 100644 --- 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 @@ -14,16 +14,14 @@ @Fluent public final class ImageModelSettingsObjectDetection extends ImageModelSettings { /* - * Maximum number of detections per image, for all classes. Must be a - * positive integer. + * 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 + * During inference, only return proposals with a classification score greater than * BoxScoreThreshold. Must be a float in the range[0, 1]. */ @JsonProperty(value = "boxScoreThreshold") @@ -38,20 +36,16 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings 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. + * 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. + * 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") @@ -74,33 +68,28 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings private Boolean multiScale; /* - * IOU threshold used during inference in NMS post processing. Must be a - * float in the range [0, 1]. + * 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. + * 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). + * 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. + * 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. */ @@ -108,8 +97,7 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings private Float tilePredictionsNmsThreshold; /* - * IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. + * IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. */ @JsonProperty(value = "validationIouThreshold") private Float validationIouThreshold; @@ -451,22 +439,15 @@ public ImageModelSettingsObjectDetection withBeta2(Float beta2) { /** {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withCheckpointDatasetId(String checkpointDatasetId) { - super.withCheckpointDatasetId(checkpointDatasetId); + public ImageModelSettingsObjectDetection withCheckpointFrequency(Integer checkpointFrequency) { + super.withCheckpointFrequency(checkpointFrequency); return this; } /** {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withCheckpointFilename(String checkpointFilename) { - super.withCheckpointFilename(checkpointFilename); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsObjectDetection withCheckpointFrequency(Integer checkpointFrequency) { - super.withCheckpointFrequency(checkpointFrequency); + public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { + super.withCheckpointModel(checkpointModel); return this; } @@ -596,13 +577,6 @@ public ImageModelSettingsObjectDetection withRandomSeed(Integer randomSeed) { return this; } - /** {@inheritDoc} */ - @Override - public ImageModelSettingsObjectDetection withSplitRatio(Float splitRatio) { - super.withSplitRatio(splitRatio); - return this; - } - /** {@inheritDoc} */ @Override public ImageModelSettingsObjectDetection withStepLRGamma(Float stepLRGamma) { 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 index 7bbc8629bbc85..a47639df1e636 100644 --- 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 @@ -32,19 +32,11 @@ public final class ImageObjectDetection extends AutoMLVertical { private ImageModelSettingsObjectDetection modelSettings; /* - * Search space for sampling different combinations of models and their - * hyperparameters. + * Search space for sampling different combinations of models and their hyperparameters. */ @JsonProperty(value = "searchSpace") private List searchSpace; - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - /* * [Required] Limit settings for the AutoML job. */ @@ -57,6 +49,20 @@ public final class ImageObjectDetection extends AutoMLVertical { @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; + /** * Get the primaryMetric property: Primary metric to optimize for this task. * @@ -119,28 +125,6 @@ public ImageObjectDetection withSearchSpace(List e.validate()); } - if (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSettings in model ImageObjectDetection")); - } else { - dataSettings().validate(); - } if (limitSettings() == null) { throw LOGGER .logExceptionAsError( @@ -221,6 +253,9 @@ public void 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 index c07185d60cff2..52f2da8a4658e 100644 --- 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 @@ -18,8 +18,7 @@ public class ImageObjectDetectionBase extends ImageVertical { private ImageModelSettingsObjectDetection modelSettings; /* - * Search space for sampling different combinations of models and their - * hyperparameters. + * Search space for sampling different combinations of models and their hyperparameters. */ @JsonProperty(value = "searchSpace") private List searchSpace; @@ -68,22 +67,29 @@ public ImageObjectDetectionBase withSearchSpace(List { + /** Static value docker for ImageType. */ + public static final ImageType DOCKER = fromString("docker"); + + /** Static value azureml for ImageType. */ + public static final ImageType AZUREML = fromString("azureml"); + + /** + * Creates or finds a ImageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImageType. + */ + @JsonCreator + public static ImageType fromString(String name) { + return fromString(name, ImageType.class); + } + + /** + * Gets known ImageType values. + * + * @return known ImageType values. + */ + public static Collection values() { + return values(ImageType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java index ec807a1c2c4a6..9a358e8ccde04 100644 --- 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 @@ -14,13 +14,6 @@ */ @Fluent public class ImageVertical { - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - /* * [Required] Limit settings for the AutoML job. */ @@ -33,27 +26,19 @@ public class ImageVertical { @JsonProperty(value = "sweepSettings") private ImageSweepSettings sweepSettings; - /** - * Get the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @return the dataSettings value. + /* + * Validation data inputs. */ - public ImageVerticalDataSettings dataSettings() { - return this.dataSettings; - } + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; - /** - * Set the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @param dataSettings the dataSettings value to set. - * @return the ImageVertical object itself. + /* + * 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. */ - public ImageVertical withDataSettings(ImageVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - return this; - } + @JsonProperty(value = "validationDataSize") + private Double validationDataSize; /** * Get the limitSettings property: [Required] Limit settings for the AutoML job. @@ -95,19 +80,54 @@ public ImageVertical withSweepSettings(ImageSweepSettings 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 (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataSettings in model ImageVertical")); - } else { - dataSettings().validate(); - } if (limitSettings() == null) { throw LOGGER .logExceptionAsError( @@ -118,6 +138,9 @@ public void 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/ImageVerticalDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalDataSettings.java deleted file mode 100644 index d2ea7cb6a60c4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalDataSettings.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Collection of registered Tabular Dataset Ids and other data settings required for training and validating models. */ -@Fluent -public final class ImageVerticalDataSettings extends DataSettings { - /* - * Settings for the validation dataset. - */ - @JsonProperty(value = "validationData") - private ImageVerticalValidationDataSettings validationData; - - /** - * Get the validationData property: Settings for the validation dataset. - * - * @return the validationData value. - */ - public ImageVerticalValidationDataSettings validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Settings for the validation dataset. - * - * @param validationData the validationData value to set. - * @return the ImageVerticalDataSettings object itself. - */ - public ImageVerticalDataSettings withValidationData(ImageVerticalValidationDataSettings validationData) { - this.validationData = validationData; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageVerticalDataSettings withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageVerticalDataSettings withTestData(TestDataSettings testData) { - super.withTestData(testData); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageVerticalDataSettings withTrainingData(TrainingDataSettings trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (validationData() != null) { - validationData().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalValidationDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalValidationDataSettings.java deleted file mode 100644 index 379528c0c12f9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalValidationDataSettings.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; - -/** The ImageVerticalValidationDataSettings model. */ -@Fluent -public final class ImageVerticalValidationDataSettings extends ValidationDataSettings { - /** {@inheritDoc} */ - @Override - public ImageVerticalValidationDataSettings withData(MLTableJobInput data) { - super.withData(data); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageVerticalValidationDataSettings withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java index a34ad497637ed..0cb39f2c553c3 100644 --- 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 @@ -23,8 +23,7 @@ public final class InferenceContainerProperties { private Route readinessRoute; /* - * The port to send the scoring requests to, within the inference server - * container. + * The port to send the scoring requests to, within the inference server container. */ @JsonProperty(value = "scoringRoute") private Route scoringRoute; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java similarity index 75% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java index 8ab96f963cf35..3e18abd293bd0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -/** An immutable client-side representation of JobBaseData. */ -public interface JobBaseData { +/** An immutable client-side representation of JobBase. */ +public interface JobBase { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -37,7 +36,7 @@ public interface JobBaseData { * * @return the properties value. */ - JobBaseDetails properties(); + JobBaseProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -54,25 +53,25 @@ public interface JobBaseData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner object. * * @return the inner object. */ - JobBaseDataInner innerModel(); + JobBaseInner innerModel(); - /** The entirety of the JobBaseData definition. */ + /** The entirety of the JobBase definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The JobBaseData definition stages. */ + /** The JobBase definition stages. */ interface DefinitionStages { - /** The first stage of the JobBaseData definition. */ + /** The first stage of the JobBase definition. */ interface Blank extends WithParentResource { } - /** The stage of the JobBaseData definition allowing to specify parent resource. */ + /** The stage of the JobBase definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -83,7 +82,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the JobBaseData definition allowing to specify properties. */ + /** The stage of the JobBase definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -91,11 +90,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(JobBaseDetails properties); + WithCreate withProperties(JobBaseProperties properties); } /** - * The stage of the JobBaseData definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. + * 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 { /** @@ -103,7 +102,7 @@ interface WithCreate { * * @return the created resource. */ - JobBaseData create(); + JobBase create(); /** * Executes the create request. @@ -111,24 +110,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - JobBaseData create(Context context); + JobBase create(Context context); } } /** - * Begins update for the JobBaseData resource. + * Begins update for the JobBase resource. * * @return the stage of resource update. */ - JobBaseData.Update update(); + JobBase.Update update(); - /** The template for JobBaseData update. */ + /** The template for JobBase update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - JobBaseData apply(); + JobBase apply(); /** * Executes the update request. @@ -136,11 +135,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - JobBaseData apply(Context context); + JobBase apply(Context context); } - /** The JobBaseData update stages. */ + /** The JobBase update stages. */ interface UpdateStages { - /** The stage of the JobBaseData update allowing to specify properties. */ + /** The stage of the JobBase update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -148,7 +147,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(JobBaseDetails properties); + Update withProperties(JobBaseProperties properties); } } /** @@ -156,7 +155,7 @@ interface WithProperties { * * @return the refreshed resource. */ - JobBaseData refresh(); + JobBase refresh(); /** * Refreshes the resource to sync with Azure. @@ -164,10 +163,10 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - JobBaseData refresh(Context context); + JobBase refresh(Context context); /** - * Cancels a Job. + * 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. @@ -175,13 +174,12 @@ interface WithProperties { void cancel(); /** - * Cancels a Job. + * 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. - * @return the {@link Response}. */ - Response cancelWithResponse(Context context); + void cancel(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java similarity index 75% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java index a710530ab7f11..8f2ec2fe6f2cf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java @@ -17,16 +17,24 @@ use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType", - defaultImpl = JobBaseDetails.class) -@JsonTypeName("JobBaseDetails") + defaultImpl = JobBaseProperties.class) +@JsonTypeName("JobBaseProperties") @JsonSubTypes({ + @JsonSubTypes.Type(name = "Labeling", value = LabelingJobProperties.class), @JsonSubTypes.Type(name = "AutoML", value = AutoMLJob.class), @JsonSubTypes.Type(name = "Command", value = CommandJob.class), @JsonSubTypes.Type(name = "Pipeline", value = PipelineJob.class), + @JsonSubTypes.Type(name = "Spark", value = SparkJob.class), @JsonSubTypes.Type(name = "Sweep", value = SweepJob.class) }) @Fluent -public class JobBaseDetails extends ResourceBase { +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. */ @@ -40,15 +48,13 @@ public class JobBaseDetails extends ResourceBase { private String displayName; /* - * The name of the experiment the job belongs to. If not set, the job is - * placed in the "Default" experiment. + * 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. + * Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. * Defaults to AmlToken if null. */ @JsonProperty(value = "identity") @@ -60,18 +66,9 @@ public class JobBaseDetails extends ResourceBase { @JsonProperty(value = "isArchived") private Boolean isArchived; - /* - * Schedule definition of job. - * If no schedule is provided, the job is run once and immediately after - * submission. - */ - @JsonProperty(value = "schedule") - private ScheduleBase schedule; - /* * List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of - * FileStreamObject. + * 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) @@ -83,6 +80,26 @@ public class JobBaseDetails extends ResourceBase { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private JobStatus status; + /** + * 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. * @@ -96,9 +113,9 @@ public String computeId() { * Set the computeId property: ARM resource ID of the compute resource. * * @param computeId the computeId value to set. - * @return the JobBaseDetails object itself. + * @return the JobBaseProperties object itself. */ - public JobBaseDetails withComputeId(String computeId) { + public JobBaseProperties withComputeId(String computeId) { this.computeId = computeId; return this; } @@ -116,9 +133,9 @@ public String displayName() { * Set the displayName property: Display name of job. * * @param displayName the displayName value to set. - * @return the JobBaseDetails object itself. + * @return the JobBaseProperties object itself. */ - public JobBaseDetails withDisplayName(String displayName) { + public JobBaseProperties withDisplayName(String displayName) { this.displayName = displayName; return this; } @@ -138,9 +155,9 @@ public String experimentName() { * the "Default" experiment. * * @param experimentName the experimentName value to set. - * @return the JobBaseDetails object itself. + * @return the JobBaseProperties object itself. */ - public JobBaseDetails withExperimentName(String experimentName) { + public JobBaseProperties withExperimentName(String experimentName) { this.experimentName = experimentName; return this; } @@ -160,9 +177,9 @@ public IdentityConfiguration identity() { * UserIdentity or null. Defaults to AmlToken if null. * * @param identity the identity value to set. - * @return the JobBaseDetails object itself. + * @return the JobBaseProperties object itself. */ - public JobBaseDetails withIdentity(IdentityConfiguration identity) { + public JobBaseProperties withIdentity(IdentityConfiguration identity) { this.identity = identity; return this; } @@ -180,35 +197,13 @@ public Boolean isArchived() { * Set the isArchived property: Is the asset archived?. * * @param isArchived the isArchived value to set. - * @return the JobBaseDetails object itself. + * @return the JobBaseProperties object itself. */ - public JobBaseDetails withIsArchived(Boolean isArchived) { + public JobBaseProperties withIsArchived(Boolean isArchived) { this.isArchived = isArchived; return this; } - /** - * Get the schedule property: Schedule definition of job. If no schedule is provided, the job is run once and - * immediately after submission. - * - * @return the schedule value. - */ - public ScheduleBase schedule() { - return this.schedule; - } - - /** - * Set the schedule property: Schedule definition of job. If no schedule is provided, the job is run once and - * immediately after submission. - * - * @param schedule the schedule value to set. - * @return the JobBaseDetails object itself. - */ - public JobBaseDetails withSchedule(ScheduleBase schedule) { - this.schedule = schedule; - return this; - } - /** * Get the services property: List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of * FileStreamObject. @@ -224,9 +219,9 @@ public Map services() { * FileStreamObject. * * @param services the services value to set. - * @return the JobBaseDetails object itself. + * @return the JobBaseProperties object itself. */ - public JobBaseDetails withServices(Map services) { + public JobBaseProperties withServices(Map services) { this.services = services; return this; } @@ -242,21 +237,21 @@ public JobStatus status() { /** {@inheritDoc} */ @Override - public JobBaseDetails withDescription(String description) { + public JobBaseProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public JobBaseDetails withProperties(Map properties) { + public JobBaseProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public JobBaseDetails withTags(Map tags) { + public JobBaseProperties withTags(Map tags) { super.withTags(tags); return this; } @@ -272,9 +267,6 @@ public void validate() { if (identity() != null) { identity().validate(); } - if (schedule() != null) { - schedule().validate(); - } if (services() != null) { services() .values() 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 index fd407407a447f..4f3146d42fbb3 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class JobBaseResourceArmPaginatedResult { /* - * The link to the next page of JobBase objects. If null, there are no - * additional pages. + * The link to the next page of JobBase objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class JobBaseResourceArmPaginatedResult { * An array of objects of type JobBase. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. @@ -50,7 +49,7 @@ public JobBaseResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -60,7 +59,7 @@ public List value() { * @param value the value value to set. * @return the JobBaseResourceArmPaginatedResult object itself. */ - public JobBaseResourceArmPaginatedResult withValue(List value) { + public JobBaseResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index f199a9b1d5105..7dbaeab565066 100644 --- 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 @@ -18,13 +18,13 @@ defaultImpl = JobInput.class) @JsonTypeName("JobInput") @JsonSubTypes({ - @JsonSubTypes.Type(name = "MLTable", value = MLTableJobInput.class), - @JsonSubTypes.Type(name = "CustomModel", value = CustomModelJobInput.class), - @JsonSubTypes.Type(name = "Literal", value = LiteralJobInput.class), - @JsonSubTypes.Type(name = "MLFlowModel", value = MLFlowModelJobInput.class), - @JsonSubTypes.Type(name = "TritonModel", value = TritonModelJobInput.class), - @JsonSubTypes.Type(name = "UriFile", value = UriFileJobInput.class), - @JsonSubTypes.Type(name = "UriFolder", value = UriFolderJobInput.class) + @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 { 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 index a6bf86251e040..91d6a97ad2e07 100644 --- 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 @@ -10,26 +10,26 @@ /** Defines values for JobInputType. */ public final class JobInputType extends ExpandableStringEnum { - /** Static value Literal for JobInputType. */ - public static final JobInputType LITERAL = fromString("Literal"); + /** Static value literal for JobInputType. */ + public static final JobInputType LITERAL = fromString("literal"); - /** Static value UriFile for JobInputType. */ - public static final JobInputType URI_FILE = fromString("UriFile"); + /** Static value uri_file for JobInputType. */ + public static final JobInputType URI_FILE = fromString("uri_file"); - /** Static value UriFolder for JobInputType. */ - public static final JobInputType URI_FOLDER = fromString("UriFolder"); + /** 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 mltable for JobInputType. */ + public static final JobInputType MLTABLE = fromString("mltable"); - /** Static value CustomModel for JobInputType. */ - public static final JobInputType CUSTOM_MODEL = fromString("CustomModel"); + /** Static value custom_model for JobInputType. */ + public static final JobInputType CUSTOM_MODEL = fromString("custom_model"); - /** Static value MLFlowModel for JobInputType. */ - public static final JobInputType MLFLOW_MODEL = fromString("MLFlowModel"); + /** Static value mlflow_model for JobInputType. */ + public static final JobInputType MLFLOW_MODEL = fromString("mlflow_model"); - /** Static value TritonModel for JobInputType. */ - public static final JobInputType TRITON_MODEL = fromString("TritonModel"); + /** Static value triton_model for JobInputType. */ + public static final JobInputType TRITON_MODEL = fromString("triton_model"); /** * Creates or finds a JobInputType from its string representation. 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 index 42eb703e246f8..439d0bf70232e 100644 --- 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 @@ -25,8 +25,8 @@ @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. + * 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; 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 index 6204ce4d27cf9..66ad70ab29d22 100644 --- 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 @@ -18,12 +18,12 @@ defaultImpl = JobOutput.class) @JsonTypeName("JobOutput") @JsonSubTypes({ - @JsonSubTypes.Type(name = "CustomModel", value = CustomModelJobOutput.class), - @JsonSubTypes.Type(name = "MLFlowModel", value = MLFlowModelJobOutput.class), - @JsonSubTypes.Type(name = "MLTable", value = MLTableJobOutput.class), - @JsonSubTypes.Type(name = "TritonModel", value = TritonModelJobOutput.class), - @JsonSubTypes.Type(name = "UriFile", value = UriFileJobOutput.class), - @JsonSubTypes.Type(name = "UriFolder", value = UriFolderJobOutput.class) + @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 { 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 index 23f9d16fd47c8..854b95af160d8 100644 --- 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 @@ -10,23 +10,23 @@ /** Defines values for JobOutputType. */ public final class JobOutputType extends ExpandableStringEnum { - /** Static value UriFile for JobOutputType. */ - public static final JobOutputType URI_FILE = fromString("UriFile"); + /** Static value uri_file for JobOutputType. */ + public static final JobOutputType URI_FILE = fromString("uri_file"); - /** Static value UriFolder for JobOutputType. */ - public static final JobOutputType URI_FOLDER = fromString("UriFolder"); + /** 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 mltable for JobOutputType. */ + public static final JobOutputType MLTABLE = fromString("mltable"); - /** Static value CustomModel for JobOutputType. */ - public static final JobOutputType CUSTOM_MODEL = fromString("CustomModel"); + /** Static value custom_model for JobOutputType. */ + public static final JobOutputType CUSTOM_MODEL = fromString("custom_model"); - /** Static value MLFlowModel for JobOutputType. */ - public static final JobOutputType MLFLOW_MODEL = fromString("MLFlowModel"); + /** Static value mlflow_model for JobOutputType. */ + public static final JobOutputType MLFLOW_MODEL = fromString("mlflow_model"); - /** Static value TritonModel for JobOutputType. */ - public static final JobOutputType TRITON_MODEL = fromString("TritonModel"); + /** Static value triton_model for JobOutputType. */ + public static final JobOutputType TRITON_MODEL = fromString("triton_model"); /** * Creates or finds a JobOutputType from its string representation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobProvisioningState.java new file mode 100644 index 0000000000000..c4afe8949e7e7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobProvisioningState.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 JobProvisioningState. */ +public final class JobProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for JobProvisioningState. */ + public static final JobProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for JobProvisioningState. */ + public static final JobProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for JobProvisioningState. */ + public static final JobProvisioningState CANCELED = fromString("Canceled"); + + /** Static value InProgress for JobProvisioningState. */ + public static final JobProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Creates or finds a JobProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobProvisioningState. + */ + @JsonCreator + public static JobProvisioningState fromString(String name) { + return fromString(name, JobProvisioningState.class); + } + + /** + * Gets known JobProvisioningState values. + * + * @return known JobProvisioningState values. + */ + public static Collection values() { + return values(JobProvisioningState.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 new file mode 100644 index 0000000000000..1c4012514a00e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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 new file mode 100644 index 0000000000000..6889ff25a9b67 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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; + + /** + * 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/JobType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java index 04f1769d5774c..459f3f9b8ea3f 100644 --- 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 @@ -16,12 +16,18 @@ public final class JobType extends ExpandableStringEnum { /** Static value Command for JobType. */ public static final JobType COMMAND = fromString("Command"); + /** Static value Labeling for JobType. */ + public static final JobType LABELING = fromString("Labeling"); + /** Static value Sweep for JobType. */ public static final JobType SWEEP = fromString("Sweep"); /** Static value Pipeline for JobType. */ public static final JobType PIPELINE = fromString("Pipeline"); + /** Static value Spark for JobType. */ + public static final JobType SPARK = fromString("Spark"); + /** * Creates or finds a JobType from its string representation. * 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 index 7663da5b1b7bb..2fcdbcdc23750 100644 --- 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 @@ -20,7 +20,7 @@ public interface Jobs { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * Lists Jobs in the workspace. @@ -39,7 +39,7 @@ public interface Jobs { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -86,7 +86,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Job by name/id. */ - JobBaseData get(String resourceGroupName, String workspaceName, String id); + JobBase get(String resourceGroupName, String workspaceName, String id); /** * Gets a Job by name/id. @@ -100,10 +100,10 @@ PagedIterable list( * @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); + Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); /** - * Cancels a Job. + * 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. @@ -115,7 +115,7 @@ PagedIterable list( void cancel(String resourceGroupName, String workspaceName, String id); /** - * Cancels a Job. + * 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. @@ -124,9 +124,8 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response cancelWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + void cancel(String resourceGroupName, String workspaceName, String id, Context context); /** * Gets a Job by name/id. @@ -137,7 +136,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Job by name/id along with {@link Response}. */ - JobBaseData getById(String id); + JobBase getById(String id); /** * Gets a Job by name/id. @@ -149,7 +148,7 @@ PagedIterable list( * @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); + Response getByIdWithResponse(String id, Context context); /** * Deletes a Job (asynchronous). @@ -173,10 +172,10 @@ PagedIterable list( void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new JobBaseData resource. + * Begins definition for a new JobBase resource. * * @param name resource name. - * @return the first stage of the new JobBaseData definition. + * @return the first stage of the new JobBase definition. */ - JobBaseData.DefinitionStages.Blank define(String name); + JobBase.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java index d885160183b60..3dea326f853a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java @@ -24,8 +24,8 @@ public class KerberosCredentials { private String kerberosPrincipal; /* - * [Required] Domain over which a Kerberos authentication server has the - * authority to authenticate a user, host or service. + * [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or + * service. */ @JsonProperty(value = "kerberosRealm", required = true) private String kerberosRealm; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java index d080800ab04ed..387f3b33923da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java @@ -34,8 +34,8 @@ public final class KerberosKeytabCredentials extends DatastoreCredentials { private String kerberosPrincipal; /* - * [Required] Domain over which a Kerberos authentication server has the - * authority to authenticate a user, host or service. + * [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or + * service. */ @JsonProperty(value = "kerberosRealm", required = true) private String kerberosRealm; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.java index 2210056b5f4d8..7a25327566cdb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.java @@ -34,8 +34,8 @@ public final class KerberosPasswordCredentials extends DatastoreCredentials { private String kerberosPrincipal; /* - * [Required] Domain over which a Kerberos authentication server has the - * authority to authenticate a user, host or service. + * [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or + * service. */ @JsonProperty(value = "kerberosRealm", required = true) private String kerberosRealm; 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 index 01e573a78520e..6825ed6cbf8d0 100644 --- 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 @@ -14,7 +14,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") @JsonTypeName("Kubernetes") @Fluent -public final class KubernetesOnlineDeployment extends OnlineDeploymentDetails { +public final class KubernetesOnlineDeployment extends OnlineDeploymentProperties { /* * The resource requirements for the container (cpu and memory). */ @@ -85,13 +85,6 @@ public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { return this; } - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withPrivateNetworkConnection(Boolean privateNetworkConnection) { - super.withPrivateNetworkConnection(privateNetworkConnection); - return this; - } - /** {@inheritDoc} */ @Override public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelCategory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelCategory.java new file mode 100644 index 0000000000000..59a8c4ab562cc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelCategory.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + +/** Label category definition. */ +@Fluent +public final class LabelCategory { + /* + * Dictionary of label classes in this category. + */ + @JsonProperty(value = "classes") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map classes; + + /* + * Display name of the label category. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Indicates whether it is allowed to select multiple classes in this category. + */ + @JsonProperty(value = "multiSelectEnabled") + private Boolean multiSelectEnabled; + + /** + * Get the classes property: Dictionary of label classes in this category. + * + * @return the classes value. + */ + public Map classes() { + return this.classes; + } + + /** + * Set the classes property: Dictionary of label classes in this category. + * + * @param classes the classes value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withClasses(Map classes) { + this.classes = classes; + return this; + } + + /** + * Get the displayName property: Display name of the label category. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the label category. + * + * @param displayName the displayName value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the multiSelectEnabled property: Indicates whether it is allowed to select multiple classes in this category. + * + * @return the multiSelectEnabled value. + */ + public Boolean multiSelectEnabled() { + return this.multiSelectEnabled; + } + + /** + * Set the multiSelectEnabled property: Indicates whether it is allowed to select multiple classes in this category. + * + * @param multiSelectEnabled the multiSelectEnabled value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withMultiSelectEnabled(Boolean multiSelectEnabled) { + this.multiSelectEnabled = multiSelectEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (classes() != null) { + classes() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelClass.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelClass.java new file mode 100644 index 0000000000000..0a8809e633210 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelClass.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + +/** Label class definition. */ +@Fluent +public final class LabelClass { + /* + * Display name of the label class. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Dictionary of subclasses of the label class. + */ + @JsonProperty(value = "subclasses") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map subclasses; + + /** + * Get the displayName property: Display name of the label class. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the label class. + * + * @param displayName the displayName value to set. + * @return the LabelClass object itself. + */ + public LabelClass withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the subclasses property: Dictionary of subclasses of the label class. + * + * @return the subclasses value. + */ + public Map subclasses() { + return this.subclasses; + } + + /** + * Set the subclasses property: Dictionary of subclasses of the label class. + * + * @param subclasses the subclasses value to set. + * @return the LabelClass object itself. + */ + public LabelClass withSubclasses(Map subclasses) { + this.subclasses = subclasses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subclasses() != null) { + subclasses() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingDataConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingDataConfiguration.java new file mode 100644 index 0000000000000..19779e18edf29 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingDataConfiguration.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Labeling data configuration definition. */ +@Fluent +public final class LabelingDataConfiguration { + /* + * Resource Id of the data asset to perform labeling. + */ + @JsonProperty(value = "dataId") + private String dataId; + + /* + * Indicates whether to enable incremental data refresh. + */ + @JsonProperty(value = "incrementalDataRefreshEnabled") + private Boolean incrementalDataRefreshEnabled; + + /** + * Get the dataId property: Resource Id of the data asset to perform labeling. + * + * @return the dataId value. + */ + public String dataId() { + return this.dataId; + } + + /** + * Set the dataId property: Resource Id of the data asset to perform labeling. + * + * @param dataId the dataId value to set. + * @return the LabelingDataConfiguration object itself. + */ + public LabelingDataConfiguration withDataId(String dataId) { + this.dataId = dataId; + return this; + } + + /** + * Get the incrementalDataRefreshEnabled property: Indicates whether to enable incremental data refresh. + * + * @return the incrementalDataRefreshEnabled value. + */ + public Boolean incrementalDataRefreshEnabled() { + return this.incrementalDataRefreshEnabled; + } + + /** + * Set the incrementalDataRefreshEnabled property: Indicates whether to enable incremental data refresh. + * + * @param incrementalDataRefreshEnabled the incrementalDataRefreshEnabled value to set. + * @return the LabelingDataConfiguration object itself. + */ + public LabelingDataConfiguration withIncrementalDataRefreshEnabled(Boolean incrementalDataRefreshEnabled) { + this.incrementalDataRefreshEnabled = incrementalDataRefreshEnabled; + 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/LabelingJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJob.java new file mode 100644 index 0000000000000..53aabdc612d5a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJob.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights 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.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; + +/** An immutable client-side representation of LabelingJob. */ +public interface LabelingJob { + /** + * 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. + */ + LabelingJobProperties 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.LabelingJobInner object. + * + * @return the inner object. + */ + LabelingJobInner innerModel(); + + /** The entirety of the LabelingJob definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The LabelingJob definition stages. */ + interface DefinitionStages { + /** The first stage of the LabelingJob definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the LabelingJob 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 LabelingJob 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(LabelingJobProperties properties); + } + /** + * The stage of the LabelingJob 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. + */ + LabelingJob create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LabelingJob create(Context context); + } + } + /** + * Begins update for the LabelingJob resource. + * + * @return the stage of resource update. + */ + LabelingJob.Update update(); + + /** The template for LabelingJob update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LabelingJob apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LabelingJob apply(Context context); + } + /** The LabelingJob update stages. */ + interface UpdateStages { + /** The stage of the LabelingJob 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(LabelingJobProperties properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LabelingJob refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LabelingJob refresh(Context context); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportSummary exportLabels(ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportSummary exportLabels(ExportSummaryInner body, Context context); + + /** + * Pause a labeling job. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void pause(); + + /** + * Pause a labeling job. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response pauseWithResponse(Context context); + + /** + * Resume a labeling 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 resume(); + + /** + * Resume a labeling 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 resume(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobImageProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobImageProperties.java new file mode 100644 index 0000000000000..a007b358dbd67 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobImageProperties.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + +/** Properties of a labeling job for image data. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mediaType") +@JsonTypeName("Image") +@Fluent +public final class LabelingJobImageProperties extends LabelingJobMediaProperties { + /* + * Annotation type of image labeling job. + */ + @JsonProperty(value = "annotationType") + private ImageAnnotationType annotationType; + + /** + * Get the annotationType property: Annotation type of image labeling job. + * + * @return the annotationType value. + */ + public ImageAnnotationType annotationType() { + return this.annotationType; + } + + /** + * Set the annotationType property: Annotation type of image labeling job. + * + * @param annotationType the annotationType value to set. + * @return the LabelingJobImageProperties object itself. + */ + public LabelingJobImageProperties withAnnotationType(ImageAnnotationType annotationType) { + this.annotationType = annotationType; + 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/LabelingJobInstructions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobInstructions.java new file mode 100644 index 0000000000000..878f11d5c5ce6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobInstructions.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Instructions for labeling job. */ +@Fluent +public final class LabelingJobInstructions { + /* + * The link to a page with detailed labeling instructions for labelers. + */ + @JsonProperty(value = "uri") + private String uri; + + /** + * Get the uri property: The link to a page with detailed labeling instructions for labelers. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: The link to a page with detailed labeling instructions for labelers. + * + * @param uri the uri value to set. + * @return the LabelingJobInstructions object itself. + */ + public LabelingJobInstructions 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/PartialOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobMediaProperties.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeployment.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobMediaProperties.java index 0843c1eacbca4..6b27b50c03c89 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobMediaProperties.java @@ -9,19 +9,19 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Mutable online deployment configuration. */ +/** Properties of a labeling job. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "endpointComputeType", - defaultImpl = PartialOnlineDeployment.class) -@JsonTypeName("PartialOnlineDeployment") + property = "mediaType", + defaultImpl = LabelingJobMediaProperties.class) +@JsonTypeName("LabelingJobMediaProperties") @JsonSubTypes({ - @JsonSubTypes.Type(name = "Kubernetes", value = PartialKubernetesOnlineDeployment.class), - @JsonSubTypes.Type(name = "Managed", value = PartialManagedOnlineDeployment.class) + @JsonSubTypes.Type(name = "Image", value = LabelingJobImageProperties.class), + @JsonSubTypes.Type(name = "Text", value = LabelingJobTextProperties.class) }) @Immutable -public class PartialOnlineDeployment { +public class LabelingJobMediaProperties { /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobProperties.java new file mode 100644 index 0000000000000..3c1b6330cdef1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobProperties.java @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** Labeling job definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") +@JsonTypeName("Labeling") +@Fluent +public final class LabelingJobProperties extends JobBaseProperties { + /* + * Created time of the job in UTC timezone. + */ + @JsonProperty(value = "createdDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateTime; + + /* + * Configuration of data used in the job. + */ + @JsonProperty(value = "dataConfiguration") + private LabelingDataConfiguration dataConfiguration; + + /* + * Labeling instructions of the job. + */ + @JsonProperty(value = "jobInstructions") + private LabelingJobInstructions jobInstructions; + + /* + * Label categories of the job. + */ + @JsonProperty(value = "labelCategories") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map labelCategories; + + /* + * Media type specific properties in the job. + */ + @JsonProperty(value = "labelingJobMediaProperties") + private LabelingJobMediaProperties labelingJobMediaProperties; + + /* + * Configuration of MLAssist feature in the job. + */ + @JsonProperty(value = "mlAssistConfiguration") + private MLAssistConfiguration mlAssistConfiguration; + + /* + * Progress metrics of the job. + */ + @JsonProperty(value = "progressMetrics", access = JsonProperty.Access.WRITE_ONLY) + private ProgressMetrics progressMetrics; + + /* + * Internal id of the job(Previously called project). + */ + @JsonProperty(value = "projectId", access = JsonProperty.Access.WRITE_ONLY) + private UUID projectId; + + /* + * Specifies the labeling job provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private JobProvisioningState provisioningState; + + /* + * Status messages of the job. + */ + @JsonProperty(value = "statusMessages", access = JsonProperty.Access.WRITE_ONLY) + private List statusMessages; + + /** + * Get the createdDateTime property: Created time of the job in UTC timezone. + * + * @return the createdDateTime value. + */ + public OffsetDateTime createdDateTime() { + return this.createdDateTime; + } + + /** + * Get the dataConfiguration property: Configuration of data used in the job. + * + * @return the dataConfiguration value. + */ + public LabelingDataConfiguration dataConfiguration() { + return this.dataConfiguration; + } + + /** + * Set the dataConfiguration property: Configuration of data used in the job. + * + * @param dataConfiguration the dataConfiguration value to set. + * @return the LabelingJobProperties object itself. + */ + public LabelingJobProperties withDataConfiguration(LabelingDataConfiguration dataConfiguration) { + this.dataConfiguration = dataConfiguration; + return this; + } + + /** + * Get the jobInstructions property: Labeling instructions of the job. + * + * @return the jobInstructions value. + */ + public LabelingJobInstructions jobInstructions() { + return this.jobInstructions; + } + + /** + * Set the jobInstructions property: Labeling instructions of the job. + * + * @param jobInstructions the jobInstructions value to set. + * @return the LabelingJobProperties object itself. + */ + public LabelingJobProperties withJobInstructions(LabelingJobInstructions jobInstructions) { + this.jobInstructions = jobInstructions; + return this; + } + + /** + * Get the labelCategories property: Label categories of the job. + * + * @return the labelCategories value. + */ + public Map labelCategories() { + return this.labelCategories; + } + + /** + * Set the labelCategories property: Label categories of the job. + * + * @param labelCategories the labelCategories value to set. + * @return the LabelingJobProperties object itself. + */ + public LabelingJobProperties withLabelCategories(Map labelCategories) { + this.labelCategories = labelCategories; + return this; + } + + /** + * Get the labelingJobMediaProperties property: Media type specific properties in the job. + * + * @return the labelingJobMediaProperties value. + */ + public LabelingJobMediaProperties labelingJobMediaProperties() { + return this.labelingJobMediaProperties; + } + + /** + * Set the labelingJobMediaProperties property: Media type specific properties in the job. + * + * @param labelingJobMediaProperties the labelingJobMediaProperties value to set. + * @return the LabelingJobProperties object itself. + */ + public LabelingJobProperties withLabelingJobMediaProperties(LabelingJobMediaProperties labelingJobMediaProperties) { + this.labelingJobMediaProperties = labelingJobMediaProperties; + return this; + } + + /** + * Get the mlAssistConfiguration property: Configuration of MLAssist feature in the job. + * + * @return the mlAssistConfiguration value. + */ + public MLAssistConfiguration mlAssistConfiguration() { + return this.mlAssistConfiguration; + } + + /** + * Set the mlAssistConfiguration property: Configuration of MLAssist feature in the job. + * + * @param mlAssistConfiguration the mlAssistConfiguration value to set. + * @return the LabelingJobProperties object itself. + */ + public LabelingJobProperties withMlAssistConfiguration(MLAssistConfiguration mlAssistConfiguration) { + this.mlAssistConfiguration = mlAssistConfiguration; + return this; + } + + /** + * Get the progressMetrics property: Progress metrics of the job. + * + * @return the progressMetrics value. + */ + public ProgressMetrics progressMetrics() { + return this.progressMetrics; + } + + /** + * Get the projectId property: Internal id of the job(Previously called project). + * + * @return the projectId value. + */ + public UUID projectId() { + return this.projectId; + } + + /** + * Get the provisioningState property: Specifies the labeling job provisioning state. + * + * @return the provisioningState value. + */ + public JobProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the statusMessages property: Status messages of the job. + * + * @return the statusMessages value. + */ + public List statusMessages() { + return this.statusMessages; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withComputeId(String computeId) { + super.withComputeId(computeId); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withExperimentName(String experimentName) { + super.withExperimentName(experimentName); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withServices(Map services) { + super.withServices(services); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public LabelingJobProperties 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 (dataConfiguration() != null) { + dataConfiguration().validate(); + } + if (jobInstructions() != null) { + jobInstructions().validate(); + } + if (labelCategories() != null) { + labelCategories() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (labelingJobMediaProperties() != null) { + labelingJobMediaProperties().validate(); + } + if (mlAssistConfiguration() != null) { + mlAssistConfiguration().validate(); + } + if (progressMetrics() != null) { + progressMetrics().validate(); + } + if (statusMessages() != null) { + statusMessages().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..f613800221d77 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobResourceArmPaginatedResult.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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.LabelingJobInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of LabelingJob entities. */ +@Fluent +public final class LabelingJobResourceArmPaginatedResult { + /* + * The link to the next page of LabelingJob objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type LabelingJob. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of LabelingJob 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 LabelingJob objects. If null, there are no additional + * pages. + * + * @param nextLink the nextLink value to set. + * @return the LabelingJobResourceArmPaginatedResult object itself. + */ + public LabelingJobResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type LabelingJob. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type LabelingJob. + * + * @param value the value value to set. + * @return the LabelingJobResourceArmPaginatedResult object itself. + */ + public LabelingJobResourceArmPaginatedResult 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/LabelingJobTextProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobTextProperties.java new file mode 100644 index 0000000000000..a8376fa69c425 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobTextProperties.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + +/** Properties of a labeling job for text data. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mediaType") +@JsonTypeName("Text") +@Fluent +public final class LabelingJobTextProperties extends LabelingJobMediaProperties { + /* + * Annotation type of text labeling job. + */ + @JsonProperty(value = "annotationType") + private TextAnnotationType annotationType; + + /** + * Get the annotationType property: Annotation type of text labeling job. + * + * @return the annotationType value. + */ + public TextAnnotationType annotationType() { + return this.annotationType; + } + + /** + * Set the annotationType property: Annotation type of text labeling job. + * + * @param annotationType the annotationType value to set. + * @return the LabelingJobTextProperties object itself. + */ + public LabelingJobTextProperties withAnnotationType(TextAnnotationType annotationType) { + this.annotationType = annotationType; + 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/LabelingJobs.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobs.java new file mode 100644 index 0000000000000..c4a8473128c1c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobs.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; + +/** Resource collection API of LabelingJobs. */ +public interface LabelingJobs { + /** + * Lists labeling 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 LabelingJob entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists labeling 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 count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context); + + /** + * Delete a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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); + + /** + * Delete a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 id, Context context); + + /** + * Gets a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id. + */ + LabelingJob get(String resourceGroupName, String workspaceName, String id); + + /** + * Gets a labeling 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 LabelingJob. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String workspaceName, + String id, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context); + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportSummary exportLabels(String resourceGroupName, String workspaceName, String id, ExportSummaryInner body); + + /** + * Export labels from a labeling 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 LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportSummary exportLabels( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context); + + /** + * Pause a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void pause(String resourceGroupName, String workspaceName, String id); + + /** + * Pause a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 pauseWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + + /** + * Resume a labeling 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 LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resume(String resourceGroupName, String workspaceName, String id); + + /** + * Resume a labeling 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 LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resume(String resourceGroupName, String workspaceName, String id, Context context); + + /** + * Gets a labeling 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 labeling job by name/id along with {@link Response}. + */ + LabelingJob getById(String id); + + /** + * Gets a labeling job by name/id. + * + * @param id the resource ID. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id along with {@link Response}. + */ + Response getByIdWithResponse( + String id, Boolean includeJobInstructions, Boolean includeLabelCategories, Context context); + + /** + * Delete a labeling job. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a labeling job. + * + * @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 LabelingJob resource. + * + * @param name resource name. + * @return the first stage of the new LabelingJob definition. + */ + LabelingJob.DefinitionStages.Blank define(String name); +} 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 index 734a5f698344f..7ee84c68173f7 100644 --- 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 @@ -19,9 +19,8 @@ public final class ListAmlUserFeatureResult { 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. + * 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; 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 index 20d35a418ec86..4dd781c0889c4 100644 --- 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 @@ -19,9 +19,8 @@ public final class ListUsagesResult { 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. + * 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; 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 index 189878d1d5fb9..025842b39e5ce 100644 --- 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 @@ -19,9 +19,8 @@ public final class ListWorkspaceQuotas { 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. + * 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; 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 index 1a6ba7478d16b..daac4d2172e0b 100644 --- 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 @@ -12,7 +12,7 @@ /** Literal input type. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("Literal") +@JsonTypeName("literal") @Fluent public final class LiteralJobInput extends JobInput { /* diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialAssetReferenceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.java similarity index 60% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialAssetReferenceBase.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.java index 030c087c98c9c..ed0f367f46af3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialAssetReferenceBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.java @@ -9,20 +9,19 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base definition for asset references. */ +/** Labeling MLAssist configuration definition. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "referenceType", - defaultImpl = PartialAssetReferenceBase.class) -@JsonTypeName("PartialAssetReferenceBase") + property = "mlAssist", + defaultImpl = MLAssistConfiguration.class) +@JsonTypeName("MLAssistConfiguration") @JsonSubTypes({ - @JsonSubTypes.Type(name = "DataPath", value = PartialDataPathAssetReference.class), - @JsonSubTypes.Type(name = "Id", value = PartialIdAssetReference.class), - @JsonSubTypes.Type(name = "OutputPath", value = PartialOutputPathAssetReference.class) + @JsonSubTypes.Type(name = "Disabled", value = MLAssistConfigurationDisabled.class), + @JsonSubTypes.Type(name = "Enabled", value = MLAssistConfigurationEnabled.class) }) @Immutable -public class PartialAssetReferenceBase { +public class MLAssistConfiguration { /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedOnlineDeployment.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java index a44f5303a1237..754c53acdf747 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedOnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java @@ -8,11 +8,11 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Properties specific to a ManagedOnlineDeployment. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") -@JsonTypeName("Managed") +/** Labeling MLAssist configuration definition when MLAssist is disabled. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mlAssist") +@JsonTypeName("Disabled") @Immutable -public final class PartialManagedOnlineDeployment extends PartialOnlineDeployment { +public final class MLAssistConfigurationDisabled extends MLAssistConfiguration { /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationEnabled.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationEnabled.java new file mode 100644 index 0000000000000..efb09bbe78047 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationEnabled.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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; + +/** Labeling MLAssist configuration definition when MLAssist is enabled. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mlAssist") +@JsonTypeName("Enabled") +@Fluent +public final class MLAssistConfigurationEnabled extends MLAssistConfiguration { + /* + * [Required] AML compute binding used in inferencing. + */ + @JsonProperty(value = "inferencingComputeBinding", required = true) + private String inferencingComputeBinding; + + /* + * [Required] AML compute binding used in training. + */ + @JsonProperty(value = "trainingComputeBinding", required = true) + private String trainingComputeBinding; + + /** + * Get the inferencingComputeBinding property: [Required] AML compute binding used in inferencing. + * + * @return the inferencingComputeBinding value. + */ + public String inferencingComputeBinding() { + return this.inferencingComputeBinding; + } + + /** + * Set the inferencingComputeBinding property: [Required] AML compute binding used in inferencing. + * + * @param inferencingComputeBinding the inferencingComputeBinding value to set. + * @return the MLAssistConfigurationEnabled object itself. + */ + public MLAssistConfigurationEnabled withInferencingComputeBinding(String inferencingComputeBinding) { + this.inferencingComputeBinding = inferencingComputeBinding; + return this; + } + + /** + * Get the trainingComputeBinding property: [Required] AML compute binding used in training. + * + * @return the trainingComputeBinding value. + */ + public String trainingComputeBinding() { + return this.trainingComputeBinding; + } + + /** + * Set the trainingComputeBinding property: [Required] AML compute binding used in training. + * + * @param trainingComputeBinding the trainingComputeBinding value to set. + * @return the MLAssistConfigurationEnabled object itself. + */ + public MLAssistConfigurationEnabled withTrainingComputeBinding(String trainingComputeBinding) { + this.trainingComputeBinding = trainingComputeBinding; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (inferencingComputeBinding() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property inferencingComputeBinding in model MLAssistConfigurationEnabled")); + } + if (trainingComputeBinding() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property trainingComputeBinding in model MLAssistConfigurationEnabled")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MLAssistConfigurationEnabled.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationType.java new file mode 100644 index 0000000000000..f57ace0f4d511 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 MLAssistConfigurationType. */ +public final class MLAssistConfigurationType extends ExpandableStringEnum { + /** Static value Enabled for MLAssistConfigurationType. */ + public static final MLAssistConfigurationType ENABLED = fromString("Enabled"); + + /** Static value Disabled for MLAssistConfigurationType. */ + public static final MLAssistConfigurationType DISABLED = fromString("Disabled"); + + /** + * Creates or finds a MLAssistConfigurationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MLAssistConfigurationType. + */ + @JsonCreator + public static MLAssistConfigurationType fromString(String name) { + return fromString(name, MLAssistConfigurationType.class); + } + + /** + * Gets known MLAssistConfigurationType values. + * + * @return known MLAssistConfigurationType values. + */ + public static Collection values() { + return values(MLAssistConfigurationType.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 index c7348c7fb7554..aa9e20c05ce07 100644 --- 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 @@ -12,7 +12,7 @@ /** The MLFlowModelJobInput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("MLFlowModel") +@JsonTypeName("mlflow_model") @Fluent public final class MLFlowModelJobInput extends JobInput { /* 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 index 826b8d43d63aa..1609f2e2867ba 100644 --- 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 @@ -11,7 +11,7 @@ /** The MLFlowModelJobOutput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("MLFlowModel") +@JsonTypeName("mlflow_model") @Fluent public final class MLFlowModelJobOutput extends JobOutput { /* 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 index 6b0f9ed108f8e..0aabd81bf11e7 100644 --- 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 @@ -13,9 +13,9 @@ /** MLTable data definition. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") -@JsonTypeName("MLTable") +@JsonTypeName("mltable") @Fluent -public final class MLTableData extends DataVersionBaseDetails { +public final class MLTableData extends DataVersionBaseProperties { /* * Uris referenced in the MLTable definition (required for lineage) */ 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 index fc727a6412a7c..495e6abf04070 100644 --- 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 @@ -12,7 +12,7 @@ /** The MLTableJobInput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("MLTable") +@JsonTypeName("mltable") @Fluent public final class MLTableJobInput extends JobInput { /* 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 index d3e0e4016825a..7fb2b26a783b7 100644 --- 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 @@ -11,7 +11,7 @@ /** The MLTableJobOutput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("MLTable") +@JsonTypeName("mltable") @Fluent public final class MLTableJobOutput extends JobOutput { /* 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 index b2043af3eaf43..1ab0cd98c88ad 100644 --- 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 @@ -16,22 +16,19 @@ @Fluent public class ManagedIdentity extends IdentityConfiguration { /* - * Specifies a user-assigned identity by client ID. For system-assigned, do - * not set this field. + * 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. + * 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. + * Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. */ @JsonProperty(value = "resourceId") private String resourceId; 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 new file mode 100644 index 0000000000000..19ab36080052f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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 index 369fafc05b950..6c33fd76f1cec 100644 --- 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 @@ -13,7 +13,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") @JsonTypeName("Managed") @Fluent -public final class ManagedOnlineDeployment extends OnlineDeploymentDetails { +public final class ManagedOnlineDeployment extends OnlineDeploymentProperties { /** {@inheritDoc} */ @Override public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { @@ -57,13 +57,6 @@ public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { return this; } - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withPrivateNetworkConnection(Boolean privateNetworkConnection) { - super.withPrivateNetworkConnection(privateNetworkConnection); - return this; - } - /** {@inheritDoc} */ @Override public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { 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 index c31c18ce491e3..6f8d4fd2311fb 100644 --- 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 @@ -15,30 +15,28 @@ @Fluent public class ManagedServiceIdentity { /* - * The service principal ID of the system assigned identity. This property - * will only be provided for a system assigned identity. + * 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. + * 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). + * 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: + * 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. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MediaType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MediaType.java new file mode 100644 index 0000000000000..feeff334df5a6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MediaType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 MediaType. */ +public final class MediaType extends ExpandableStringEnum { + /** Static value Image for MediaType. */ + public static final MediaType IMAGE = fromString("Image"); + + /** Static value Text for MediaType. */ + public static final MediaType TEXT = fromString("Text"); + + /** + * Creates or finds a MediaType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaType. + */ + @JsonCreator + public static MediaType fromString(String name) { + return fromString(name, MediaType.class); + } + + /** + * Gets known MediaType values. + * + * @return known MediaType values. + */ + public static Collection values() { + return values(MediaType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java similarity index 73% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java index 9573580903bb1..0841f457eef91 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -/** An immutable client-side representation of CodeContainerData. */ -public interface CodeContainerData { +/** An immutable client-side representation of ModelContainer. */ +public interface ModelContainer { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface CodeContainerData { * * @return the properties value. */ - CodeContainerDetails properties(); + ModelContainerProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface CodeContainerData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner object. * * @return the inner object. */ - CodeContainerDataInner innerModel(); + ModelContainerInner innerModel(); - /** The entirety of the CodeContainerData definition. */ + /** The entirety of the ModelContainer definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The CodeContainerData definition stages. */ + /** The ModelContainer definition stages. */ interface DefinitionStages { - /** The first stage of the CodeContainerData definition. */ + /** The first stage of the ModelContainer definition. */ interface Blank extends WithParentResource { } - /** The stage of the CodeContainerData definition allowing to specify parent resource. */ + /** The stage of the ModelContainer definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -82,7 +82,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the CodeContainerData definition allowing to specify properties. */ + /** The stage of the ModelContainer definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -90,10 +90,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(CodeContainerDetails properties); + WithCreate withProperties(ModelContainerProperties properties); } /** - * The stage of the CodeContainerData definition which contains all the minimum required properties for the + * 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 { @@ -102,7 +102,7 @@ interface WithCreate { * * @return the created resource. */ - CodeContainerData create(); + ModelContainer create(); /** * Executes the create request. @@ -110,24 +110,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - CodeContainerData create(Context context); + ModelContainer create(Context context); } } /** - * Begins update for the CodeContainerData resource. + * Begins update for the ModelContainer resource. * * @return the stage of resource update. */ - CodeContainerData.Update update(); + ModelContainer.Update update(); - /** The template for CodeContainerData update. */ + /** The template for ModelContainer update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - CodeContainerData apply(); + ModelContainer apply(); /** * Executes the update request. @@ -135,11 +135,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - CodeContainerData apply(Context context); + ModelContainer apply(Context context); } - /** The CodeContainerData update stages. */ + /** The ModelContainer update stages. */ interface UpdateStages { - /** The stage of the CodeContainerData update allowing to specify properties. */ + /** The stage of the ModelContainer update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -147,7 +147,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(CodeContainerDetails properties); + Update withProperties(ModelContainerProperties properties); } } /** @@ -155,7 +155,7 @@ interface WithProperties { * * @return the refreshed resource. */ - CodeContainerData refresh(); + ModelContainer refresh(); /** * Refreshes the resource to sync with Azure. @@ -163,5 +163,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - CodeContainerData refresh(Context context); + ModelContainer refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java similarity index 68% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java index 20fcd6820c0fb..a3d0f06cde85c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java @@ -7,33 +7,33 @@ import com.azure.core.annotation.Fluent; import java.util.Map; -/** The ModelContainerDetails model. */ +/** The ModelContainerProperties model. */ @Fluent -public final class ModelContainerDetails extends AssetContainer { +public final class ModelContainerProperties extends AssetContainer { /** {@inheritDoc} */ @Override - public ModelContainerDetails withIsArchived(Boolean isArchived) { + public ModelContainerProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public ModelContainerDetails withDescription(String description) { + public ModelContainerProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public ModelContainerDetails withProperties(Map properties) { + public ModelContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public ModelContainerDetails withTags(Map tags) { + public ModelContainerProperties withTags(Map tags) { super.withTags(tags); return this; } 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 index adf8b64de64a0..5e3eb5767365f 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class ModelContainerResourceArmPaginatedResult { /* - * The link to the next page of ModelContainer objects. If null, there are - * no additional pages. + * The link to the next page of ModelContainer objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class ModelContainerResourceArmPaginatedResult { * An array of objects of type ModelContainer. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional @@ -52,7 +51,7 @@ public ModelContainerResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the ModelContainerResourceArmPaginatedResult object itself. */ - public ModelContainerResourceArmPaginatedResult withValue(List value) { + public ModelContainerResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index c629ea65fcaea..29868c8ee3627 100644 --- 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 @@ -20,7 +20,7 @@ public interface ModelContainers { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List model containers. @@ -36,7 +36,7 @@ public interface ModelContainers { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String skip, @@ -81,7 +81,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container. */ - ModelContainerData get(String resourceGroupName, String workspaceName, String name); + ModelContainer get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -95,7 +95,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** @@ -107,7 +107,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container along with {@link Response}. */ - ModelContainerData getById(String id); + ModelContainer getById(String id); /** * Get container. @@ -119,7 +119,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete container. @@ -144,10 +144,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new ModelContainerData resource. + * Begins definition for a new ModelContainer resource. * * @param name resource name. - * @return the first stage of the new ModelContainerData definition. + * @return the first stage of the new ModelContainer definition. */ - ModelContainerData.DefinitionStages.Blank define(String name); + ModelContainer.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelType.java deleted file mode 100644 index 457991e34222f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelType.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ModelType. */ -public final class ModelType extends ExpandableStringEnum { - /** Static value CustomModel for ModelType. */ - public static final ModelType CUSTOM_MODEL = fromString("CustomModel"); - - /** Static value MLFlowModel for ModelType. */ - public static final ModelType MLFLOW_MODEL = fromString("MLFlowModel"); - - /** Static value TritonModel for ModelType. */ - public static final ModelType TRITON_MODEL = fromString("TritonModel"); - - /** - * Creates or finds a ModelType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ModelType. - */ - @JsonCreator - public static ModelType fromString(String name) { - return fromString(name, ModelType.class); - } - - /** - * Gets known ModelType values. - * - * @return known ModelType values. - */ - public static Collection values() { - return values(ModelType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java similarity index 73% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java index 8b3a0b2871a1b..6d8d49f169842 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java @@ -6,10 +6,10 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -/** An immutable client-side representation of ModelVersionData. */ -public interface ModelVersionData { +/** An immutable client-side representation of ModelVersion. */ +public interface ModelVersion { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface ModelVersionData { * * @return the properties value. */ - ModelVersionDetails properties(); + ModelVersionProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,25 +53,25 @@ public interface ModelVersionData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner object. * * @return the inner object. */ - ModelVersionDataInner innerModel(); + ModelVersionInner innerModel(); - /** The entirety of the ModelVersionData definition. */ + /** The entirety of the ModelVersion definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ModelVersionData definition stages. */ + /** The ModelVersion definition stages. */ interface DefinitionStages { - /** The first stage of the ModelVersionData definition. */ + /** The first stage of the ModelVersion definition. */ interface Blank extends WithParentResource { } - /** The stage of the ModelVersionData definition allowing to specify parent resource. */ + /** The stage of the ModelVersion definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, name. @@ -83,7 +83,7 @@ interface WithParentResource { */ WithProperties withExistingModel(String resourceGroupName, String workspaceName, String name); } - /** The stage of the ModelVersionData definition allowing to specify properties. */ + /** The stage of the ModelVersion definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -91,11 +91,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(ModelVersionDetails properties); + WithCreate withProperties(ModelVersionProperties properties); } /** - * The stage of the ModelVersionData definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * 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 { /** @@ -103,7 +103,7 @@ interface WithCreate { * * @return the created resource. */ - ModelVersionData create(); + ModelVersion create(); /** * Executes the create request. @@ -111,24 +111,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - ModelVersionData create(Context context); + ModelVersion create(Context context); } } /** - * Begins update for the ModelVersionData resource. + * Begins update for the ModelVersion resource. * * @return the stage of resource update. */ - ModelVersionData.Update update(); + ModelVersion.Update update(); - /** The template for ModelVersionData update. */ + /** The template for ModelVersion update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - ModelVersionData apply(); + ModelVersion apply(); /** * Executes the update request. @@ -136,11 +136,11 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - ModelVersionData apply(Context context); + ModelVersion apply(Context context); } - /** The ModelVersionData update stages. */ + /** The ModelVersion update stages. */ interface UpdateStages { - /** The stage of the ModelVersionData update allowing to specify properties. */ + /** The stage of the ModelVersion update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -148,7 +148,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(ModelVersionDetails properties); + Update withProperties(ModelVersionProperties properties); } } /** @@ -156,7 +156,7 @@ interface WithProperties { * * @return the refreshed resource. */ - ModelVersionData refresh(); + ModelVersion refresh(); /** * Refreshes the resource to sync with Azure. @@ -164,5 +164,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - ModelVersionData refresh(Context context); + ModelVersion refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java index 9da6e6feee08e..f57878b19cf03 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java @@ -11,7 +11,7 @@ /** Model asset version details. */ @Fluent -public final class ModelVersionDetails extends AssetBase { +public final class ModelVersionProperties extends AssetBase { /* * Mapping of model flavors to their properties. */ @@ -29,7 +29,7 @@ public final class ModelVersionDetails extends AssetBase { * The storage format for this entity. Used for NCD. */ @JsonProperty(value = "modelType") - private ModelType modelType; + private String modelType; /* * The URI path to the model contents. @@ -50,9 +50,9 @@ public Map flavors() { * Set the flavors property: Mapping of model flavors to their properties. * * @param flavors the flavors value to set. - * @return the ModelVersionDetails object itself. + * @return the ModelVersionProperties object itself. */ - public ModelVersionDetails withFlavors(Map flavors) { + public ModelVersionProperties withFlavors(Map flavors) { this.flavors = flavors; return this; } @@ -70,9 +70,9 @@ public String jobName() { * Set the jobName property: Name of the training job which produced this model. * * @param jobName the jobName value to set. - * @return the ModelVersionDetails object itself. + * @return the ModelVersionProperties object itself. */ - public ModelVersionDetails withJobName(String jobName) { + public ModelVersionProperties withJobName(String jobName) { this.jobName = jobName; return this; } @@ -82,7 +82,7 @@ public ModelVersionDetails withJobName(String jobName) { * * @return the modelType value. */ - public ModelType modelType() { + public String modelType() { return this.modelType; } @@ -90,9 +90,9 @@ public ModelType modelType() { * Set the modelType property: The storage format for this entity. Used for NCD. * * @param modelType the modelType value to set. - * @return the ModelVersionDetails object itself. + * @return the ModelVersionProperties object itself. */ - public ModelVersionDetails withModelType(ModelType modelType) { + public ModelVersionProperties withModelType(String modelType) { this.modelType = modelType; return this; } @@ -110,44 +110,44 @@ public String modelUri() { * Set the modelUri property: The URI path to the model contents. * * @param modelUri the modelUri value to set. - * @return the ModelVersionDetails object itself. + * @return the ModelVersionProperties object itself. */ - public ModelVersionDetails withModelUri(String modelUri) { + public ModelVersionProperties withModelUri(String modelUri) { this.modelUri = modelUri; return this; } /** {@inheritDoc} */ @Override - public ModelVersionDetails withIsAnonymous(Boolean isAnonymous) { + public ModelVersionProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } /** {@inheritDoc} */ @Override - public ModelVersionDetails withIsArchived(Boolean isArchived) { + public ModelVersionProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } /** {@inheritDoc} */ @Override - public ModelVersionDetails withDescription(String description) { + public ModelVersionProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public ModelVersionDetails withProperties(Map properties) { + public ModelVersionProperties withProperties(Map properties) { super.withProperties(properties); return this; } /** {@inheritDoc} */ @Override - public ModelVersionDetails withTags(Map tags) { + public ModelVersionProperties withTags(Map tags) { super.withTags(tags); return this; } 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 index eeefe6c1d55e3..82e3c4fbc04dd 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class ModelVersionResourceArmPaginatedResult { /* - * The link to the next page of ModelVersion objects. If null, there are no - * additional pages. + * The link to the next page of ModelVersion objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class ModelVersionResourceArmPaginatedResult { * An array of objects of type ModelVersion. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional @@ -52,7 +51,7 @@ public ModelVersionResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the ModelVersionResourceArmPaginatedResult object itself. */ - public ModelVersionResourceArmPaginatedResult withValue(List value) { + public ModelVersionResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 01f803ff77346..cc195b373f07f 100644 --- 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 @@ -21,7 +21,7 @@ public interface ModelVersions { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** * List model versions. @@ -45,7 +45,7 @@ public interface ModelVersions { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -102,7 +102,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version. */ - ModelVersionData get(String resourceGroupName, String workspaceName, String name, String version); + ModelVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -117,7 +117,7 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** @@ -129,7 +129,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return version along with {@link Response}. */ - ModelVersionData getById(String id); + ModelVersion getById(String id); /** * Get version. @@ -141,7 +141,7 @@ Response getWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete version. @@ -166,10 +166,10 @@ Response getWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new ModelVersionData resource. + * Begins definition for a new ModelVersion resource. * * @param name resource name. - * @return the first stage of the new ModelVersionData definition. + * @return the first stage of the new ModelVersion definition. */ - ModelVersionData.DefinitionStages.Blank define(String name); + ModelVersion.DefinitionStages.Blank define(String name); } 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 index 06d7e7163e891..826426bf0a64b 100644 --- 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 @@ -10,12 +10,6 @@ /** Abstract class for NLP related AutoML tasks. NLP - Natural Language Processing. */ @Fluent public class NlpVertical { - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - /* * Featurization inputs needed for AutoML job. */ @@ -28,25 +22,11 @@ public class NlpVertical { @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; - /** - * Get the dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the NlpVertical object itself. + /* + * Validation data inputs. */ - public NlpVertical withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - return this; - } + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. @@ -88,20 +68,40 @@ public NlpVertical withLimitSettings(NlpVerticalLimitSettings 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 (dataSettings() != null) { - dataSettings().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/NlpVerticalDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalDataSettings.java deleted file mode 100644 index a8541602826ca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalDataSettings.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Class for data inputs. NLP - Natural Language Processing. */ -@Fluent -public final class NlpVerticalDataSettings extends DataSettings { - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private NlpVerticalValidationDataSettings validationData; - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public NlpVerticalValidationDataSettings validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the NlpVerticalDataSettings object itself. - */ - public NlpVerticalDataSettings withValidationData(NlpVerticalValidationDataSettings validationData) { - this.validationData = validationData; - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalDataSettings withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalDataSettings withTestData(TestDataSettings testData) { - super.withTestData(testData); - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalDataSettings withTrainingData(TrainingDataSettings trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (validationData() != null) { - validationData().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalValidationDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalValidationDataSettings.java deleted file mode 100644 index 83a16977dc67b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalValidationDataSettings.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; - -/** The NlpVerticalValidationDataSettings model. */ -@Fluent -public final class NlpVerticalValidationDataSettings extends ValidationDataSettings { - /** {@inheritDoc} */ - @Override - public NlpVerticalValidationDataSettings withData(MLTableJobInput data) { - super.withData(data); - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalValidationDataSettings withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java index d2c75d39b07e2..cb88386a758ae 100644 --- 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 @@ -11,46 +11,57 @@ @Immutable public final class NodeStateCounts { /* - * Idle node count. Number of compute nodes in idle state. + * 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. + * 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. + * 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. + * 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. + * 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. + * Preempted node count. + * + * Number of compute nodes which are in preempted state. */ @JsonProperty(value = "preemptedNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer preemptedNodeCount; /** - * Get the idleNodeCount property: Idle node count. Number of compute nodes in idle state. + * Get the idleNodeCount property: Idle node count. + * + *

Number of compute nodes in idle state. * * @return the idleNodeCount value. */ @@ -59,7 +70,9 @@ public Integer idleNodeCount() { } /** - * Get the runningNodeCount property: Running node count. Number of compute nodes which are running jobs. + * Get the runningNodeCount property: Running node count. + * + *

Number of compute nodes which are running jobs. * * @return the runningNodeCount value. */ @@ -68,7 +81,9 @@ public Integer runningNodeCount() { } /** - * Get the preparingNodeCount property: Preparing node count. Number of compute nodes which are being prepared. + * Get the preparingNodeCount property: Preparing node count. + * + *

Number of compute nodes which are being prepared. * * @return the preparingNodeCount value. */ @@ -77,7 +92,9 @@ public Integer preparingNodeCount() { } /** - * Get the unusableNodeCount property: Unusable node count. Number of compute nodes which are in unusable state. + * Get the unusableNodeCount property: Unusable node count. + * + *

Number of compute nodes which are in unusable state. * * @return the unusableNodeCount value. */ @@ -86,7 +103,9 @@ public Integer unusableNodeCount() { } /** - * Get the leavingNodeCount property: Leaving node count. Number of compute nodes which are leaving the amlCompute. + * Get the leavingNodeCount property: Leaving node count. + * + *

Number of compute nodes which are leaving the amlCompute. * * @return the leavingNodeCount value. */ @@ -95,7 +114,9 @@ public Integer leavingNodeCount() { } /** - * Get the preemptedNodeCount property: Preempted node count. Number of compute nodes which are in preempted state. + * Get the preemptedNodeCount property: Preempted node count. + * + *

Number of compute nodes which are in preempted state. * * @return the preemptedNodeCount value. */ 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 new file mode 100644 index 0000000000000..114b42c6294b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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 { + /** {@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/OnlineDeploymentData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java index d8007d460272d..fa2f7df17b374 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java @@ -8,11 +8,11 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; import java.util.Map; -/** An immutable client-side representation of OnlineDeploymentData. */ -public interface OnlineDeploymentData { +/** An immutable client-side representation of OnlineDeployment. */ +public interface OnlineDeployment { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -68,7 +68,7 @@ public interface OnlineDeploymentData { * * @return the properties value. */ - OnlineDeploymentDetails properties(); + OnlineDeploymentProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -106,13 +106,13 @@ public interface OnlineDeploymentData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner object. * * @return the inner object. */ - OnlineDeploymentDataInner innerModel(); + OnlineDeploymentInner innerModel(); - /** The entirety of the OnlineDeploymentData definition. */ + /** The entirety of the OnlineDeployment definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, @@ -120,12 +120,12 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The OnlineDeploymentData definition stages. */ + /** The OnlineDeployment definition stages. */ interface DefinitionStages { - /** The first stage of the OnlineDeploymentData definition. */ + /** The first stage of the OnlineDeployment definition. */ interface Blank extends WithLocation { } - /** The stage of the OnlineDeploymentData definition allowing to specify location. */ + /** The stage of the OnlineDeployment definition allowing to specify location. */ interface WithLocation { /** * Specifies the region for the resource. @@ -143,7 +143,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } - /** The stage of the OnlineDeploymentData definition allowing to specify parent resource. */ + /** The stage of the OnlineDeployment definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, endpointName. @@ -156,7 +156,7 @@ interface WithParentResource { WithProperties withExistingOnlineEndpoint( String resourceGroupName, String workspaceName, String endpointName); } - /** The stage of the OnlineDeploymentData definition allowing to specify properties. */ + /** The stage of the OnlineDeployment definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -164,10 +164,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(OnlineDeploymentDetails properties); + WithCreate withProperties(OnlineDeploymentProperties properties); } /** - * The stage of the OnlineDeploymentData definition which contains all the minimum required properties for the + * 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 @@ -180,7 +180,7 @@ interface WithCreate * * @return the created resource. */ - OnlineDeploymentData create(); + OnlineDeployment create(); /** * Executes the create request. @@ -188,9 +188,9 @@ interface WithCreate * @param context The context to associate with this operation. * @return the created resource. */ - OnlineDeploymentData create(Context context); + OnlineDeployment create(Context context); } - /** The stage of the OnlineDeploymentData definition allowing to specify tags. */ + /** The stage of the OnlineDeployment definition allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -200,7 +200,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the OnlineDeploymentData definition allowing to specify identity. */ + /** 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 @@ -211,7 +211,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the OnlineDeploymentData definition allowing to specify kind. */ + /** 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 @@ -223,7 +223,7 @@ interface WithKind { */ WithCreate withKind(String kind); } - /** The stage of the OnlineDeploymentData definition allowing to specify sku. */ + /** The stage of the OnlineDeployment definition allowing to specify sku. */ interface WithSku { /** * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. @@ -235,25 +235,20 @@ interface WithSku { } } /** - * Begins update for the OnlineDeploymentData resource. + * Begins update for the OnlineDeployment resource. * * @return the stage of resource update. */ - OnlineDeploymentData.Update update(); + OnlineDeployment.Update update(); - /** The template for OnlineDeploymentData update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithKind, - UpdateStages.WithProperties, - UpdateStages.WithSku { + /** The template for OnlineDeployment update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { /** * Executes the update request. * * @return the updated resource. */ - OnlineDeploymentData apply(); + OnlineDeployment apply(); /** * Executes the update request. @@ -261,11 +256,11 @@ interface Update * @param context The context to associate with this operation. * @return the updated resource. */ - OnlineDeploymentData apply(Context context); + OnlineDeployment apply(Context context); } - /** The OnlineDeploymentData update stages. */ + /** The OnlineDeployment update stages. */ interface UpdateStages { - /** The stage of the OnlineDeploymentData update allowing to specify tags. */ + /** The stage of the OnlineDeployment update allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -275,40 +270,7 @@ interface WithTags { */ Update withTags(Map tags); } - /** The stage of the OnlineDeploymentData update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - Update withIdentity(PartialManagedServiceIdentity identity); - } - /** The stage of the OnlineDeploymentData update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - Update withKind(String kind); - } - /** The stage of the OnlineDeploymentData update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Additional attributes of the entity.. - * - * @param properties Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(PartialOnlineDeployment properties); - } - /** The stage of the OnlineDeploymentData update allowing to specify sku. */ + /** The stage of the OnlineDeployment update allowing to specify sku. */ interface WithSku { /** * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. @@ -324,7 +286,7 @@ interface WithSku { * * @return the refreshed resource. */ - OnlineDeploymentData refresh(); + OnlineDeployment refresh(); /** * Refreshes the resource to sync with Azure. @@ -332,7 +294,7 @@ interface WithSku { * @param context The context to associate with this operation. * @return the refreshed resource. */ - OnlineDeploymentData refresh(Context context); + OnlineDeployment refresh(Context context); /** * Polls an Endpoint operation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java similarity index 73% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java index d8bf089ea113c..474a65829f3d9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java @@ -11,19 +11,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** The OnlineDeploymentDetails model. */ +/** The OnlineDeploymentProperties model. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType", - defaultImpl = OnlineDeploymentDetails.class) -@JsonTypeName("OnlineDeploymentDetails") + defaultImpl = OnlineDeploymentProperties.class) +@JsonTypeName("OnlineDeploymentProperties") @JsonSubTypes({ @JsonSubTypes.Type(name = "Kubernetes", value = KubernetesOnlineDeployment.class), @JsonSubTypes.Type(name = "Managed", value = ManagedOnlineDeployment.class) }) @Fluent -public class OnlineDeploymentDetails extends EndpointDeploymentPropertiesBase { +public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase { /* * If true, enables Application Insights logging. */ @@ -31,8 +31,7 @@ public class OnlineDeploymentDetails extends EndpointDeploymentPropertiesBase { private Boolean appInsightsEnabled; /* - * If Enabled, allow egress public network access. If Disabled, this will - * create secure egress. Default: Enabled. + * If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. */ @JsonProperty(value = "egressPublicNetworkAccess") private EgressPublicNetworkAccessType egressPublicNetworkAccess; @@ -61,13 +60,6 @@ public class OnlineDeploymentDetails extends EndpointDeploymentPropertiesBase { @JsonProperty(value = "modelMountPath") private String modelMountPath; - /* - * If true, enable private network connection. - * DEPRECATED for future API versions. Use EgressPublicNetworkAccess. - */ - @JsonProperty(value = "privateNetworkConnection") - private Boolean privateNetworkConnection; - /* * Provisioning state for the endpoint deployment. */ @@ -75,8 +67,8 @@ public class OnlineDeploymentDetails extends EndpointDeploymentPropertiesBase { private DeploymentProvisioningState provisioningState; /* - * Readiness probe validates if the container is ready to serve traffic. - * The properties and defaults are the same as liveness probe. + * 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; @@ -90,8 +82,7 @@ public class OnlineDeploymentDetails extends EndpointDeploymentPropertiesBase { /* * Scale settings for the deployment. * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for - * KubernetesOnlineDeployment + * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment * and to DefaultScaleSettings for ManagedOnlineDeployment. */ @JsonProperty(value = "scaleSettings") @@ -110,9 +101,9 @@ public Boolean appInsightsEnabled() { * Set the appInsightsEnabled property: If true, enables Application Insights logging. * * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withAppInsightsEnabled(Boolean appInsightsEnabled) { + public OnlineDeploymentProperties withAppInsightsEnabled(Boolean appInsightsEnabled) { this.appInsightsEnabled = appInsightsEnabled; return this; } @@ -132,9 +123,9 @@ public EgressPublicNetworkAccessType egressPublicNetworkAccess() { * will create secure egress. Default: Enabled. * * @param egressPublicNetworkAccess the egressPublicNetworkAccess value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withEgressPublicNetworkAccess( + public OnlineDeploymentProperties withEgressPublicNetworkAccess( EgressPublicNetworkAccessType egressPublicNetworkAccess) { this.egressPublicNetworkAccess = egressPublicNetworkAccess; return this; @@ -153,9 +144,9 @@ public String instanceType() { * Set the instanceType property: Compute instance type. * * @param instanceType the instanceType value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withInstanceType(String instanceType) { + public OnlineDeploymentProperties withInstanceType(String instanceType) { this.instanceType = instanceType; return this; } @@ -173,9 +164,9 @@ public ProbeSettings livenessProbe() { * Set the livenessProbe property: Liveness probe monitors the health of the container regularly. * * @param livenessProbe the livenessProbe value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withLivenessProbe(ProbeSettings livenessProbe) { + public OnlineDeploymentProperties withLivenessProbe(ProbeSettings livenessProbe) { this.livenessProbe = livenessProbe; return this; } @@ -193,9 +184,9 @@ public String model() { * Set the model property: The URI path to the model. * * @param model the model value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withModel(String model) { + public OnlineDeploymentProperties withModel(String model) { this.model = model; return this; } @@ -213,35 +204,13 @@ public String modelMountPath() { * Set the modelMountPath property: The path to mount the model in custom container. * * @param modelMountPath the modelMountPath value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withModelMountPath(String modelMountPath) { + public OnlineDeploymentProperties withModelMountPath(String modelMountPath) { this.modelMountPath = modelMountPath; return this; } - /** - * Get the privateNetworkConnection property: If true, enable private network connection. DEPRECATED for future API - * versions. Use EgressPublicNetworkAccess. - * - * @return the privateNetworkConnection value. - */ - public Boolean privateNetworkConnection() { - return this.privateNetworkConnection; - } - - /** - * Set the privateNetworkConnection property: If true, enable private network connection. DEPRECATED for future API - * versions. Use EgressPublicNetworkAccess. - * - * @param privateNetworkConnection the privateNetworkConnection value to set. - * @return the OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withPrivateNetworkConnection(Boolean privateNetworkConnection) { - this.privateNetworkConnection = privateNetworkConnection; - return this; - } - /** * Get the provisioningState property: Provisioning state for the endpoint deployment. * @@ -266,9 +235,9 @@ public ProbeSettings readinessProbe() { * properties and defaults are the same as liveness probe. * * @param readinessProbe the readinessProbe value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withReadinessProbe(ProbeSettings readinessProbe) { + public OnlineDeploymentProperties withReadinessProbe(ProbeSettings readinessProbe) { this.readinessProbe = readinessProbe; return this; } @@ -286,9 +255,9 @@ public OnlineRequestSettings requestSettings() { * Set the requestSettings property: Request settings for the deployment. * * @param requestSettings the requestSettings value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withRequestSettings(OnlineRequestSettings requestSettings) { + public OnlineDeploymentProperties withRequestSettings(OnlineRequestSettings requestSettings) { this.requestSettings = requestSettings; return this; } @@ -310,44 +279,44 @@ public OnlineScaleSettings scaleSettings() { * ManagedOnlineDeployment. * * @param scaleSettings the scaleSettings value to set. - * @return the OnlineDeploymentDetails object itself. + * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentDetails withScaleSettings(OnlineScaleSettings scaleSettings) { + public OnlineDeploymentProperties withScaleSettings(OnlineScaleSettings scaleSettings) { this.scaleSettings = scaleSettings; return this; } /** {@inheritDoc} */ @Override - public OnlineDeploymentDetails withCodeConfiguration(CodeConfiguration codeConfiguration) { + public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { super.withCodeConfiguration(codeConfiguration); return this; } /** {@inheritDoc} */ @Override - public OnlineDeploymentDetails withDescription(String description) { + public OnlineDeploymentProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public OnlineDeploymentDetails withEnvironmentId(String environmentId) { + public OnlineDeploymentProperties withEnvironmentId(String environmentId) { super.withEnvironmentId(environmentId); return this; } /** {@inheritDoc} */ @Override - public OnlineDeploymentDetails withEnvironmentVariables(Map environmentVariables) { + public OnlineDeploymentProperties withEnvironmentVariables(Map environmentVariables) { super.withEnvironmentVariables(environmentVariables); return this; } /** {@inheritDoc} */ @Override - public OnlineDeploymentDetails withProperties(Map properties) { + public OnlineDeploymentProperties withProperties(Map properties) { super.withProperties(properties); return this; } 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 index 7f21e01700a77..c45ff88e4eaf7 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class OnlineDeploymentTrackedResourceArmPaginatedResult { /* - * The link to the next page of OnlineDeployment objects. If null, there - * are no additional pages. + * The link to the next page of OnlineDeployment objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class OnlineDeploymentTrackedResourceArmPaginatedResult { * An array of objects of type OnlineDeployment. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no @@ -52,7 +51,7 @@ public OnlineDeploymentTrackedResourceArmPaginatedResult withNextLink(String nex * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. */ - public OnlineDeploymentTrackedResourceArmPaginatedResult withValue(List value) { + public OnlineDeploymentTrackedResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 375af4784d668..aa430cec15921 100644 --- 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 @@ -21,7 +21,7 @@ public interface OnlineDeployments { * @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); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); /** * List Inference Endpoint Deployments. @@ -38,7 +38,7 @@ public interface OnlineDeployments { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String endpointName, @@ -87,8 +87,7 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return inference Deployment Deployment. */ - OnlineDeploymentData get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** * Get Inference Deployment Deployment. @@ -103,7 +102,7 @@ OnlineDeploymentData get( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return inference Deployment Deployment along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); /** @@ -196,7 +195,7 @@ PagedIterable listSkus( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return inference Deployment Deployment along with {@link Response}. */ - OnlineDeploymentData getById(String id); + OnlineDeployment getById(String id); /** * Get Inference Deployment Deployment. @@ -208,7 +207,7 @@ PagedIterable listSkus( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete Inference Endpoint Deployment (asynchronous). @@ -232,10 +231,10 @@ PagedIterable listSkus( void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new OnlineDeploymentData resource. + * Begins definition for a new OnlineDeployment resource. * * @param name resource name. - * @return the first stage of the new OnlineDeploymentData definition. + * @return the first stage of the new OnlineDeployment definition. */ - OnlineDeploymentData.DefinitionStages.Blank define(String name); + OnlineDeployment.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java similarity index 76% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointData.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java index 5cb8231f3265c..b109d3d534c83 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java @@ -8,11 +8,11 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; import java.util.Map; -/** An immutable client-side representation of OnlineEndpointData. */ -public interface OnlineEndpointData { +/** An immutable client-side representation of OnlineEndpoint. */ +public interface OnlineEndpoint { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -68,7 +68,7 @@ public interface OnlineEndpointData { * * @return the properties value. */ - OnlineEndpointDetails properties(); + OnlineEndpointProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -106,13 +106,13 @@ public interface OnlineEndpointData { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointDataInner object. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner object. * * @return the inner object. */ - OnlineEndpointDataInner innerModel(); + OnlineEndpointInner innerModel(); - /** The entirety of the OnlineEndpointData definition. */ + /** The entirety of the OnlineEndpoint definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, @@ -120,12 +120,12 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The OnlineEndpointData definition stages. */ + /** The OnlineEndpoint definition stages. */ interface DefinitionStages { - /** The first stage of the OnlineEndpointData definition. */ + /** The first stage of the OnlineEndpoint definition. */ interface Blank extends WithLocation { } - /** The stage of the OnlineEndpointData definition allowing to specify location. */ + /** The stage of the OnlineEndpoint definition allowing to specify location. */ interface WithLocation { /** * Specifies the region for the resource. @@ -143,7 +143,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } - /** The stage of the OnlineEndpointData definition allowing to specify parent resource. */ + /** The stage of the OnlineEndpoint definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. @@ -154,7 +154,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the OnlineEndpointData definition allowing to specify properties. */ + /** The stage of the OnlineEndpoint definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -162,10 +162,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(OnlineEndpointDetails properties); + WithCreate withProperties(OnlineEndpointProperties properties); } /** - * The stage of the OnlineEndpointData definition which contains all the minimum required properties for the + * 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 @@ -178,7 +178,7 @@ interface WithCreate * * @return the created resource. */ - OnlineEndpointData create(); + OnlineEndpoint create(); /** * Executes the create request. @@ -186,9 +186,9 @@ interface WithCreate * @param context The context to associate with this operation. * @return the created resource. */ - OnlineEndpointData create(Context context); + OnlineEndpoint create(Context context); } - /** The stage of the OnlineEndpointData definition allowing to specify tags. */ + /** The stage of the OnlineEndpoint definition allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -198,7 +198,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the OnlineEndpointData definition allowing to specify identity. */ + /** 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 @@ -209,7 +209,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the OnlineEndpointData definition allowing to specify kind. */ + /** 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 @@ -221,7 +221,7 @@ interface WithKind { */ WithCreate withKind(String kind); } - /** The stage of the OnlineEndpointData definition allowing to specify sku. */ + /** The stage of the OnlineEndpoint definition allowing to specify sku. */ interface WithSku { /** * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. @@ -233,25 +233,20 @@ interface WithSku { } } /** - * Begins update for the OnlineEndpointData resource. + * Begins update for the OnlineEndpoint resource. * * @return the stage of resource update. */ - OnlineEndpointData.Update update(); + OnlineEndpoint.Update update(); - /** The template for OnlineEndpointData update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithKind, - UpdateStages.WithProperties, - UpdateStages.WithSku { + /** The template for OnlineEndpoint update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { /** * Executes the update request. * * @return the updated resource. */ - OnlineEndpointData apply(); + OnlineEndpoint apply(); /** * Executes the update request. @@ -259,11 +254,11 @@ interface Update * @param context The context to associate with this operation. * @return the updated resource. */ - OnlineEndpointData apply(Context context); + OnlineEndpoint apply(Context context); } - /** The OnlineEndpointData update stages. */ + /** The OnlineEndpoint update stages. */ interface UpdateStages { - /** The stage of the OnlineEndpointData update allowing to specify tags. */ + /** The stage of the OnlineEndpoint update allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -273,7 +268,7 @@ interface WithTags { */ Update withTags(Map tags); } - /** The stage of the OnlineEndpointData update allowing to specify identity. */ + /** 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 @@ -284,45 +279,13 @@ interface WithIdentity { */ Update withIdentity(PartialManagedServiceIdentity identity); } - /** The stage of the OnlineEndpointData update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - Update withKind(String kind); - } - /** The stage of the OnlineEndpointData update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Additional attributes of the entity.. - * - * @param properties Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(PartialOnlineEndpoint properties); - } - /** The stage of the OnlineEndpointData update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - Update withSku(PartialSku sku); - } } /** * Refreshes the resource to sync with Azure. * * @return the refreshed resource. */ - OnlineEndpointData refresh(); + OnlineEndpoint refresh(); /** * Refreshes the resource to sync with Azure. @@ -330,7 +293,7 @@ interface WithSku { * @param context The context to associate with this operation. * @return the refreshed resource. */ - OnlineEndpointData refresh(Context context); + OnlineEndpoint refresh(Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java similarity index 80% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java index 0a1fe192ca99a..ab553321c4c54 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java @@ -13,7 +13,7 @@ /** Online endpoint configuration. */ @Fluent -public final class OnlineEndpointDetails extends EndpointPropertiesBaseInner { +public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner { /* * ARM resource ID of the compute if it exists. * optional @@ -22,8 +22,8 @@ public final class OnlineEndpointDetails extends EndpointPropertiesBaseInner { private String compute; /* - * Percentage of traffic to be mirrored to each deployment without using - * returned scoring. Traffic values need to sum to utmost 50. + * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to + * sum to utmost 50. */ @JsonProperty(value = "mirrorTraffic") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -36,15 +36,13 @@ public final class OnlineEndpointDetails extends EndpointPropertiesBaseInner { private EndpointProvisioningState provisioningState; /* - * Set to "Enabled" for endpoints that should allow public access when - * Private Link is enabled. + * 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. + * 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) @@ -63,9 +61,9 @@ public String compute() { * Set the compute property: ARM resource ID of the compute if it exists. optional. * * @param compute the compute value to set. - * @return the OnlineEndpointDetails object itself. + * @return the OnlineEndpointProperties object itself. */ - public OnlineEndpointDetails withCompute(String compute) { + public OnlineEndpointProperties withCompute(String compute) { this.compute = compute; return this; } @@ -85,9 +83,9 @@ public Map mirrorTraffic() { * scoring. Traffic values need to sum to utmost 50. * * @param mirrorTraffic the mirrorTraffic value to set. - * @return the OnlineEndpointDetails object itself. + * @return the OnlineEndpointProperties object itself. */ - public OnlineEndpointDetails withMirrorTraffic(Map mirrorTraffic) { + public OnlineEndpointProperties withMirrorTraffic(Map mirrorTraffic) { this.mirrorTraffic = mirrorTraffic; return this; } @@ -116,9 +114,9 @@ public PublicNetworkAccessType publicNetworkAccess() { * Link is enabled. * * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the OnlineEndpointDetails object itself. + * @return the OnlineEndpointProperties object itself. */ - public OnlineEndpointDetails withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { + public OnlineEndpointProperties withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { this.publicNetworkAccess = publicNetworkAccess; return this; } @@ -138,37 +136,37 @@ public Map traffic() { * to sum to 100. * * @param traffic the traffic value to set. - * @return the OnlineEndpointDetails object itself. + * @return the OnlineEndpointProperties object itself. */ - public OnlineEndpointDetails withTraffic(Map traffic) { + public OnlineEndpointProperties withTraffic(Map traffic) { this.traffic = traffic; return this; } /** {@inheritDoc} */ @Override - public OnlineEndpointDetails withAuthMode(EndpointAuthMode authMode) { + public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { super.withAuthMode(authMode); return this; } /** {@inheritDoc} */ @Override - public OnlineEndpointDetails withDescription(String description) { + public OnlineEndpointProperties withDescription(String description) { super.withDescription(description); return this; } /** {@inheritDoc} */ @Override - public OnlineEndpointDetails withKeys(EndpointAuthKeysInner keys) { + public OnlineEndpointProperties withKeys(EndpointAuthKeysInner keys) { super.withKeys(keys); return this; } /** {@inheritDoc} */ @Override - public OnlineEndpointDetails withProperties(Map properties) { + public OnlineEndpointProperties withProperties(Map properties) { super.withProperties(properties); return this; } 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 index 25853197fcefe..4729670e924de 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,8 +13,7 @@ @Fluent public final class OnlineEndpointTrackedResourceArmPaginatedResult { /* - * The link to the next page of OnlineEndpoint objects. If null, there are - * no additional pages. + * The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -23,7 +22,7 @@ public final class OnlineEndpointTrackedResourceArmPaginatedResult { * An array of objects of type OnlineEndpoint. */ @JsonProperty(value = "value") - private List value; + private List value; /** * Get the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional @@ -52,7 +51,7 @@ public OnlineEndpointTrackedResourceArmPaginatedResult withNextLink(String nextL * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +61,7 @@ public List value() { * @param value the value value to set. * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. */ - public OnlineEndpointTrackedResourceArmPaginatedResult withValue(List value) { + public OnlineEndpointTrackedResourceArmPaginatedResult withValue(List value) { this.value = value; return this; } 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 index 0ee0b7d4d5648..2e3cebaf1fb02 100644 --- 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 @@ -20,7 +20,7 @@ public interface OnlineEndpoints { * @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); + PagedIterable list(String resourceGroupName, String workspaceName); /** * List Online Endpoints. @@ -42,7 +42,7 @@ public interface OnlineEndpoints { * @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( + PagedIterable list( String resourceGroupName, String workspaceName, String name, @@ -90,7 +90,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return online Endpoint. */ - OnlineEndpointData get(String resourceGroupName, String workspaceName, String endpointName); + OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName); /** * Get Online Endpoint. @@ -104,7 +104,7 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return online Endpoint along with {@link Response}. */ - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context); /** @@ -205,7 +205,7 @@ Response getTokenWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return online Endpoint along with {@link Response}. */ - OnlineEndpointData getById(String id); + OnlineEndpoint getById(String id); /** * Get Online Endpoint. @@ -217,7 +217,7 @@ Response getTokenWithResponse( * @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); + Response getByIdWithResponse(String id, Context context); /** * Delete Online Endpoint (asynchronous). @@ -241,10 +241,10 @@ Response getTokenWithResponse( void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new OnlineEndpointData resource. + * Begins definition for a new OnlineEndpoint resource. * * @param name resource name. - * @return the first stage of the new OnlineEndpointData definition. + * @return the first stage of the new OnlineEndpoint definition. */ - OnlineEndpointData.DefinitionStages.Blank define(String name); + 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 index e5922f656be8f..e8c6f1ba057eb 100644 --- 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 @@ -12,15 +12,13 @@ @Fluent public final class OnlineRequestSettings { /* - * The number of maximum concurrent requests per node allowed per - * deployment. Defaults to 1. + * 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. + * The maximum amount of time a request will stay in the queue in ISO 8601 format. * Defaults to 500ms. */ @JsonProperty(value = "maxQueueWait") 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 index 3bb10862ed2b5..382f3cf9ecf97 100644 --- 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 @@ -16,6 +16,9 @@ public final class OutputDeliveryMode extends ExpandableStringEnum value; /* - * A continuation link (absolute URI) to the next page of results in the - * list. + * A continuation link (absolute URI) to the next page of results in the list. */ @JsonProperty(value = "nextLink") private String nextLink; 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 index 7f3588eac7d41..dfe6076253e10 100644 --- 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 @@ -5,150 +5,17 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; /** Mutable batch inference settings per deployment. */ @Fluent public final class PartialBatchDeployment { - /* - * Code configuration for the endpoint deployment. - */ - @JsonProperty(value = "codeConfiguration") - private PartialCodeConfiguration codeConfiguration; - - /* - * Compute binding definition. - */ - @JsonProperty(value = "compute") - private String compute; - /* * Description of the endpoint deployment. */ @JsonProperty(value = "description") private String description; - /* - * ARM resource ID of the environment specification for the endpoint - * deployment. - */ - @JsonProperty(value = "environmentId") - private String environmentId; - - /* - * Environment variables configuration for the deployment. - */ - @JsonProperty(value = "environmentVariables") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map environmentVariables; - - /* - * Error threshold, if the error count for the entire input goes above this - * value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. - * For FileDataset, this value is the count of file failures. - * For TabularDataset, this value is the count of record failures. - * If set to -1 (the lower bound), all failures during batch inference will - * be ignored. - */ - @JsonProperty(value = "errorThreshold") - private Integer errorThreshold; - - /* - * Logging level for batch inference operation. - */ - @JsonProperty(value = "loggingLevel") - private BatchLoggingLevel loggingLevel; - - /* - * Indicates number of processes per instance - */ - @JsonProperty(value = "maxConcurrencyPerInstance") - private Integer maxConcurrencyPerInstance; - - /* - * Size of the mini-batch passed to each batch invocation. - * For FileDataset, this is the number of files per mini-batch. - * For TabularDataset, this is the size of the records in bytes, per - * mini-batch. - */ - @JsonProperty(value = "miniBatchSize") - private Long miniBatchSize; - - /* - * Reference to the model asset for the endpoint deployment. - */ - @JsonProperty(value = "model") - private PartialAssetReferenceBase model; - - /* - * Indicates how the output will be organized. - */ - @JsonProperty(value = "outputAction") - private BatchOutputAction outputAction; - - /* - * Customized output file name for append_row output action. - */ - @JsonProperty(value = "outputFileName") - private String outputFileName; - - /* - * Property dictionary. Properties can be added, but not removed or - * altered. - */ - @JsonProperty(value = "properties") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map properties; - - /* - * Retry Settings for the batch inference operation. - */ - @JsonProperty(value = "retrySettings") - private PartialBatchRetrySettings retrySettings; - - /** - * Get the codeConfiguration property: Code configuration for the endpoint deployment. - * - * @return the codeConfiguration value. - */ - public PartialCodeConfiguration codeConfiguration() { - return this.codeConfiguration; - } - - /** - * Set the codeConfiguration property: Code configuration for the endpoint deployment. - * - * @param codeConfiguration the codeConfiguration value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withCodeConfiguration(PartialCodeConfiguration codeConfiguration) { - this.codeConfiguration = codeConfiguration; - return this; - } - - /** - * Get the compute property: Compute binding definition. - * - * @return the compute value. - */ - public String compute() { - return this.compute; - } - - /** - * Set the compute property: Compute binding definition. - * - * @param compute the compute value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withCompute(String compute) { - this.compute = compute; - return this; - } - /** * Get the description property: Description of the endpoint deployment. * @@ -169,248 +36,11 @@ public PartialBatchDeployment withDescription(String description) { return this; } - /** - * Get the environmentId property: ARM resource ID of the environment specification for the endpoint deployment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: ARM resource ID of the environment specification for the endpoint deployment. - * - * @param environmentId the environmentId value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the environmentVariables property: Environment variables configuration for the deployment. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Environment variables configuration for the deployment. - * - * @param environmentVariables the environmentVariables value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of - * file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), - * all failures during batch inference will be ignored. - * - * @return the errorThreshold value. - */ - public Integer errorThreshold() { - return this.errorThreshold; - } - - /** - * Set the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of - * file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), - * all failures during batch inference will be ignored. - * - * @param errorThreshold the errorThreshold value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withErrorThreshold(Integer errorThreshold) { - this.errorThreshold = errorThreshold; - return this; - } - - /** - * Get the loggingLevel property: Logging level for batch inference operation. - * - * @return the loggingLevel value. - */ - public BatchLoggingLevel loggingLevel() { - return this.loggingLevel; - } - - /** - * Set the loggingLevel property: Logging level for batch inference operation. - * - * @param loggingLevel the loggingLevel value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withLoggingLevel(BatchLoggingLevel loggingLevel) { - this.loggingLevel = loggingLevel; - return this; - } - - /** - * Get the maxConcurrencyPerInstance property: Indicates number of processes per instance. - * - * @return the maxConcurrencyPerInstance value. - */ - public Integer maxConcurrencyPerInstance() { - return this.maxConcurrencyPerInstance; - } - - /** - * Set the maxConcurrencyPerInstance property: Indicates number of processes per instance. - * - * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { - this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; - return this; - } - - /** - * Get the miniBatchSize property: Size of the mini-batch passed to each batch invocation. For FileDataset, this is - * the number of files per mini-batch. For TabularDataset, this is the size of the records in bytes, per mini-batch. - * - * @return the miniBatchSize value. - */ - public Long miniBatchSize() { - return this.miniBatchSize; - } - - /** - * Set the miniBatchSize property: Size of the mini-batch passed to each batch invocation. For FileDataset, this is - * the number of files per mini-batch. For TabularDataset, this is the size of the records in bytes, per mini-batch. - * - * @param miniBatchSize the miniBatchSize value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withMiniBatchSize(Long miniBatchSize) { - this.miniBatchSize = miniBatchSize; - return this; - } - - /** - * Get the model property: Reference to the model asset for the endpoint deployment. - * - * @return the model value. - */ - public PartialAssetReferenceBase model() { - return this.model; - } - - /** - * Set the model property: Reference to the model asset for the endpoint deployment. - * - * @param model the model value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withModel(PartialAssetReferenceBase model) { - this.model = model; - return this; - } - - /** - * Get the outputAction property: Indicates how the output will be organized. - * - * @return the outputAction value. - */ - public BatchOutputAction outputAction() { - return this.outputAction; - } - - /** - * Set the outputAction property: Indicates how the output will be organized. - * - * @param outputAction the outputAction value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withOutputAction(BatchOutputAction outputAction) { - this.outputAction = outputAction; - return this; - } - - /** - * Get the outputFileName property: Customized output file name for append_row output action. - * - * @return the outputFileName value. - */ - public String outputFileName() { - return this.outputFileName; - } - - /** - * Set the outputFileName property: Customized output file name for append_row output action. - * - * @param outputFileName the outputFileName value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withOutputFileName(String outputFileName) { - this.outputFileName = outputFileName; - return this; - } - - /** - * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @param properties the properties value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the retrySettings property: Retry Settings for the batch inference operation. - * - * @return the retrySettings value. - */ - public PartialBatchRetrySettings retrySettings() { - return this.retrySettings; - } - - /** - * Set the retrySettings property: Retry Settings for the batch inference operation. - * - * @param retrySettings the retrySettings value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withRetrySettings(PartialBatchRetrySettings retrySettings) { - this.retrySettings = retrySettings; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (codeConfiguration() != null) { - codeConfiguration().validate(); - } - if (model() != null) { - model().validate(); - } - if (retrySettings() != null) { - retrySettings().validate(); - } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java new file mode 100644 index 0000000000000..ad45c07526909 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** + * 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/PartialBatchDeploymentPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialTrackedResource.java deleted file mode 100644 index 3dfbe96a2c64e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialTrackedResource.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialBatchDeploymentPartialTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialBatchDeployment properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public PartialManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialBatchDeployment properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withProperties(PartialBatchDeployment properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public PartialSku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withSku(PartialSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpoint.java deleted file mode 100644 index 5fbe738f6cb24..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpoint.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Mutable Batch endpoint configuration. */ -@Fluent -public final class PartialBatchEndpoint { - /* - * Default values for Batch Endpoint - */ - @JsonProperty(value = "defaults") - private BatchEndpointDefaults defaults; - - /** - * Get the defaults property: Default values for Batch Endpoint. - * - * @return the defaults value. - */ - public BatchEndpointDefaults defaults() { - return this.defaults; - } - - /** - * Set the defaults property: Default values for Batch Endpoint. - * - * @param defaults the defaults value to set. - * @return the PartialBatchEndpoint object itself. - */ - public PartialBatchEndpoint withDefaults(BatchEndpointDefaults defaults) { - this.defaults = defaults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (defaults() != null) { - defaults().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpointPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpointPartialTrackedResource.java deleted file mode 100644 index be8529d9ae5b2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpointPartialTrackedResource.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialBatchEndpointPartialTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialBatchEndpoint properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public PartialManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialBatchEndpoint properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withProperties(PartialBatchEndpoint properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public PartialSku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withSku(PartialSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchRetrySettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchRetrySettings.java deleted file mode 100644 index f61f00edfae65..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchRetrySettings.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Retry settings for a batch inference operation. */ -@Fluent -public final class PartialBatchRetrySettings { - /* - * Maximum retry count for a mini-batch - */ - @JsonProperty(value = "maxRetries") - private Integer maxRetries; - - /* - * Invocation timeout for a mini-batch, in ISO 8601 format. - */ - @JsonProperty(value = "timeout") - private Duration timeout; - - /** - * Get the maxRetries property: Maximum retry count for a mini-batch. - * - * @return the maxRetries value. - */ - public Integer maxRetries() { - return this.maxRetries; - } - - /** - * Set the maxRetries property: Maximum retry count for a mini-batch. - * - * @param maxRetries the maxRetries value to set. - * @return the PartialBatchRetrySettings object itself. - */ - public PartialBatchRetrySettings withMaxRetries(Integer maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - /** - * Get the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. - * - * @return the timeout value. - */ - public Duration timeout() { - return this.timeout; - } - - /** - * Set the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. - * - * @param timeout the timeout value to set. - * @return the PartialBatchRetrySettings object itself. - */ - public PartialBatchRetrySettings withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialCodeConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialCodeConfiguration.java deleted file mode 100644 index 26cc403e2ee01..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialCodeConfiguration.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration for a scoring code asset. */ -@Fluent -public final class PartialCodeConfiguration { - /* - * ARM resource ID of the code asset. - */ - @JsonProperty(value = "codeId") - private String codeId; - - /* - * The script to execute on startup. eg. "score.py" - */ - @JsonProperty(value = "scoringScript") - private String scoringScript; - - /** - * Get the codeId property: ARM resource ID of the code asset. - * - * @return the codeId value. - */ - public String codeId() { - return this.codeId; - } - - /** - * Set the codeId property: ARM resource ID of the code asset. - * - * @param codeId the codeId value to set. - * @return the PartialCodeConfiguration object itself. - */ - public PartialCodeConfiguration withCodeId(String codeId) { - this.codeId = codeId; - return this; - } - - /** - * Get the scoringScript property: The script to execute on startup. eg. "score.py". - * - * @return the scoringScript value. - */ - public String scoringScript() { - return this.scoringScript; - } - - /** - * Set the scoringScript property: The script to execute on startup. eg. "score.py". - * - * @param scoringScript the scoringScript value to set. - * @return the PartialCodeConfiguration object itself. - */ - public PartialCodeConfiguration withScoringScript(String scoringScript) { - this.scoringScript = scoringScript; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialDataPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialDataPathAssetReference.java deleted file mode 100644 index 7e09d678dd309..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialDataPathAssetReference.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its path in a datastore. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("DataPath") -@Fluent -public final class PartialDataPathAssetReference extends PartialAssetReferenceBase { - /* - * ARM resource ID of the datastore where the asset is located. - */ - @JsonProperty(value = "datastoreId") - private String datastoreId; - - /* - * The path of the file/directory in the datastore. - */ - @JsonProperty(value = "path") - private String path; - - /** - * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. - * - * @return the datastoreId value. - */ - public String datastoreId() { - return this.datastoreId; - } - - /** - * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. - * - * @param datastoreId the datastoreId value to set. - * @return the PartialDataPathAssetReference object itself. - */ - public PartialDataPathAssetReference withDatastoreId(String datastoreId) { - this.datastoreId = datastoreId; - return this; - } - - /** - * Get the path property: The path of the file/directory in the datastore. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path of the file/directory in the datastore. - * - * @param path the path value to set. - * @return the PartialDataPathAssetReference object itself. - */ - public PartialDataPathAssetReference withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialIdAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialIdAssetReference.java deleted file mode 100644 index 5803b53593f5a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialIdAssetReference.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its ARM resource ID. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("Id") -@Fluent -public final class PartialIdAssetReference extends PartialAssetReferenceBase { - /* - * ARM resource ID of the asset. - */ - @JsonProperty(value = "assetId") - private String assetId; - - /** - * Get the assetId property: ARM resource ID of the asset. - * - * @return the assetId value. - */ - public String assetId() { - return this.assetId; - } - - /** - * Set the assetId property: ARM resource ID of the asset. - * - * @param assetId the assetId value to set. - * @return the PartialIdAssetReference object itself. - */ - public PartialIdAssetReference withAssetId(String assetId) { - this.assetId = assetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java index f10c6d4cb8f9b..1f7a26096cc0b 100644 --- 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 @@ -13,16 +13,14 @@ @Fluent public class PartialManagedServiceIdentity { /* - * Managed service identity (system assigned and/or user assigned - * identities) + * 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: + * 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. */ 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 new file mode 100644 index 0000000000000..9a7ad6bdd8c29 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** + * 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 new file mode 100644 index 0000000000000..30217ff42eabc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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 new file mode 100644 index 0000000000000..19a448c897154 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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/PartialOnlineDeploymentPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeploymentPartialTrackedResource.java deleted file mode 100644 index 59b0439ec0fdd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeploymentPartialTrackedResource.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialOnlineDeploymentPartialTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialOnlineDeployment properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public PartialManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialOnlineDeployment properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withProperties(PartialOnlineDeployment properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public PartialSku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withSku(PartialSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpoint.java deleted file mode 100644 index ef3e28340fa1c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpoint.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Mutable online endpoint configuration. */ -@Fluent -public final class PartialOnlineEndpoint { - /* - * Percentage of traffic to be mirrored to each deployment without using - * returned scoring. Traffic values need to sum to utmost 50. - */ - @JsonProperty(value = "mirrorTraffic") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map mirrorTraffic; - - /* - * Set to "Enabled" for endpoints that should allow public access when - * Private Link is enabled. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccessType publicNetworkAccess; - - /* - * Percentage of traffic from endpoint to divert to each deployment. - * Traffic values need to sum to 100. - */ - @JsonProperty(value = "traffic") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map traffic; - - /** - * Get the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned - * scoring. Traffic values need to sum to utmost 50. - * - * @return the mirrorTraffic value. - */ - public Map mirrorTraffic() { - return this.mirrorTraffic; - } - - /** - * Set the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned - * scoring. Traffic values need to sum to utmost 50. - * - * @param mirrorTraffic the mirrorTraffic value to set. - * @return the PartialOnlineEndpoint object itself. - */ - public PartialOnlineEndpoint withMirrorTraffic(Map mirrorTraffic) { - this.mirrorTraffic = mirrorTraffic; - return this; - } - - /** - * Get the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private - * Link is enabled. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccessType publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private - * Link is enabled. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the PartialOnlineEndpoint object itself. - */ - public PartialOnlineEndpoint withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the traffic property: Percentage of traffic from endpoint to divert to each deployment. Traffic values need - * to sum to 100. - * - * @return the traffic value. - */ - public Map traffic() { - return this.traffic; - } - - /** - * Set the traffic property: Percentage of traffic from endpoint to divert to each deployment. Traffic values need - * to sum to 100. - * - * @param traffic the traffic value to set. - * @return the PartialOnlineEndpoint object itself. - */ - public PartialOnlineEndpoint withTraffic(Map traffic) { - this.traffic = traffic; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpointPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpointPartialTrackedResource.java deleted file mode 100644 index 48295e01bb07d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpointPartialTrackedResource.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialOnlineEndpointPartialTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialOnlineEndpoint properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public PartialManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialOnlineEndpoint properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withProperties(PartialOnlineEndpoint properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public PartialSku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withSku(PartialSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOutputPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOutputPathAssetReference.java deleted file mode 100644 index 4490ec8d69e13..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOutputPathAssetReference.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its path in a job output. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("OutputPath") -@Fluent -public final class PartialOutputPathAssetReference extends PartialAssetReferenceBase { - /* - * ARM resource ID of the job. - */ - @JsonProperty(value = "jobId") - private String jobId; - - /* - * The path of the file/directory in the job output. - */ - @JsonProperty(value = "path") - private String path; - - /** - * Get the jobId property: ARM resource ID of the job. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: ARM resource ID of the job. - * - * @param jobId the jobId value to set. - * @return the PartialOutputPathAssetReference object itself. - */ - public PartialOutputPathAssetReference withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * Get the path property: The path of the file/directory in the job output. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path of the file/directory in the job output. - * - * @param path the path value to set. - * @return the PartialOutputPathAssetReference object itself. - */ - public PartialOutputPathAssetReference withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java index fc9c44c763dc8..375c428cf1dc3 100644 --- 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 @@ -11,16 +11,14 @@ @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. + * 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. + * If the service has different generations of hardware, for the same SKU, then that can be captured here. */ @JsonProperty(value = "family") private String family; @@ -32,15 +30,15 @@ public final class PartialSku { 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. + * 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. + * 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; 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 new file mode 100644 index 0000000000000..039103faee886 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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/PipelineJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java index 9ac31138c113d..7581dfd3c4aae 100644 --- 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 @@ -15,7 +15,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("Pipeline") @Fluent -public final class PipelineJob extends JobBaseDetails { +public final class PipelineJob extends JobBaseProperties { /* * Inputs for the pipeline job. */ @@ -43,6 +43,12 @@ public final class PipelineJob extends JobBaseDetails { @JsonProperty(value = "settings") private Object settings; + /* + * ARM resource ID of source job. + */ + @JsonProperty(value = "sourceJobId") + private String sourceJobId; + /** * Get the inputs property: Inputs for the pipeline job. * @@ -123,6 +129,33 @@ public PipelineJob withSettings(Object 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) { @@ -158,13 +191,6 @@ public PipelineJob withIsArchived(Boolean isArchived) { return this; } - /** {@inheritDoc} */ - @Override - public PipelineJob withSchedule(ScheduleBase schedule) { - super.withSchedule(schedule); - return this; - } - /** {@inheritDoc} */ @Override public PipelineJob withServices(Map services) { 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 index 2be7efc232250..e048acab7ef8b 100644 --- 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 @@ -48,8 +48,7 @@ public final class PrivateLinkResource extends ProxyResource { private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 index 874e638188c92..e521550f445d9 100644 --- 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 @@ -11,8 +11,7 @@ @Fluent public final class PrivateLinkServiceConnectionState { /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ @JsonProperty(value = "status") private PrivateEndpointServiceConnectionStatus status; @@ -24,8 +23,7 @@ public final class PrivateLinkServiceConnectionState { private String description; /* - * A message indicating if changes on the service provider require any - * updates on the consumer. + * A message indicating if changes on the service provider require any updates on the consumer. */ @JsonProperty(value = "actionsRequired") private String actionsRequired; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProgressMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProgressMetrics.java new file mode 100644 index 0000000000000..c86df2683fbf6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProgressMetrics.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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.time.OffsetDateTime; + +/** Progress metrics definition. */ +@Immutable +public final class ProgressMetrics { + /* + * The completed datapoint count. + */ + @JsonProperty(value = "completedDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long completedDatapointCount; + + /* + * The time of last successful incremental data refresh in UTC. + */ + @JsonProperty(value = "incrementalDataLastRefreshDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime incrementalDataLastRefreshDateTime; + + /* + * The skipped datapoint count. + */ + @JsonProperty(value = "skippedDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long skippedDatapointCount; + + /* + * The total datapoint count. + */ + @JsonProperty(value = "totalDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long totalDatapointCount; + + /** + * Get the completedDatapointCount property: The completed datapoint count. + * + * @return the completedDatapointCount value. + */ + public Long completedDatapointCount() { + return this.completedDatapointCount; + } + + /** + * Get the incrementalDataLastRefreshDateTime property: The time of last successful incremental data refresh in UTC. + * + * @return the incrementalDataLastRefreshDateTime value. + */ + public OffsetDateTime incrementalDataLastRefreshDateTime() { + return this.incrementalDataLastRefreshDateTime; + } + + /** + * Get the skippedDatapointCount property: The skipped datapoint count. + * + * @return the skippedDatapointCount value. + */ + public Long skippedDatapointCount() { + return this.skippedDatapointCount; + } + + /** + * Get the totalDatapointCount property: The total datapoint count. + * + * @return the totalDatapointCount value. + */ + public Long totalDatapointCount() { + return this.totalDatapointCount; + } + + /** + * 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/Protocol.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java new file mode 100644 index 0000000000000..d8510f2b15c2f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 Protocol. */ +public final class Protocol extends ExpandableStringEnum { + /** Static value tcp for Protocol. */ + public static final Protocol TCP = fromString("tcp"); + + /** Static value udp for Protocol. */ + public static final Protocol UDP = fromString("udp"); + + /** Static value http for Protocol. */ + public static final Protocol HTTP = fromString("http"); + + /** + * Creates or finds a Protocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding Protocol. + */ + @JsonCreator + public static Protocol fromString(String name) { + return fromString(name, Protocol.class); + } + + /** + * Gets known Protocol values. + * + * @return known Protocol values. + */ + public static Collection values() { + return values(Protocol.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java deleted file mode 100644 index 0aceba0fd7c8d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProvisioningState. */ -public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Unknown for ProvisioningState. */ - public static final ProvisioningState UNKNOWN = fromString("Unknown"); - - /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = fromString("Updating"); - - /** Static value Creating for ProvisioningState. */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = fromString("Deleting"); - - /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for ProvisioningState. */ - public static final ProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - @JsonCreator - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); - } - - /** - * Gets known ProvisioningState values. - * - * @return known ProvisioningState values. - */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java index 8735c29e120fe..ac1b21307aec4 100644 --- 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 @@ -23,7 +23,9 @@ public final class QuotaBaseProperties { private String type; /* - * Limit. The maximum permitted quota of the resource. + * Limit. + * + * The maximum permitted quota of the resource. */ @JsonProperty(value = "limit") private Long limit; @@ -75,7 +77,9 @@ public QuotaBaseProperties withType(String type) { } /** - * Get the limit property: Limit. The maximum permitted quota of the resource. + * Get the limit property: Limit. + * + *

The maximum permitted quota of the resource. * * @return the limit value. */ @@ -84,7 +88,9 @@ public Long limit() { } /** - * Set the limit property: Limit. The maximum permitted quota of the resource. + * Set the limit property: Limit. + * + *

The maximum permitted quota of the resource. * * @param limit the limit value to set. * @return the QuotaBaseProperties object itself. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrencePattern.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrencePattern.java deleted file mode 100644 index 68c3a5db6688d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrencePattern.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Recurrence schedule pattern definition. */ -@Fluent -public final class RecurrencePattern { - /* - * [Required] List of hours for recurrence schedule pattern - */ - @JsonProperty(value = "hours", required = true) - private List hours; - - /* - * [Required] List of minutes for recurrence schedule pattern - */ - @JsonProperty(value = "minutes", required = true) - private List minutes; - - /* - * List of weekdays for recurrence schedule pattern - */ - @JsonProperty(value = "weekdays") - private List weekdays; - - /** - * Get the hours property: [Required] List of hours for recurrence schedule pattern. - * - * @return the hours value. - */ - public List hours() { - return this.hours; - } - - /** - * Set the hours property: [Required] List of hours for recurrence schedule pattern. - * - * @param hours the hours value to set. - * @return the RecurrencePattern object itself. - */ - public RecurrencePattern withHours(List hours) { - this.hours = hours; - return this; - } - - /** - * Get the minutes property: [Required] List of minutes for recurrence schedule pattern. - * - * @return the minutes value. - */ - public List minutes() { - return this.minutes; - } - - /** - * Set the minutes property: [Required] List of minutes for recurrence schedule pattern. - * - * @param minutes the minutes value to set. - * @return the RecurrencePattern object itself. - */ - public RecurrencePattern withMinutes(List minutes) { - this.minutes = minutes; - return this; - } - - /** - * Get the weekdays property: List of weekdays for recurrence schedule pattern. - * - * @return the weekdays value. - */ - public List weekdays() { - return this.weekdays; - } - - /** - * Set the weekdays property: List of weekdays for recurrence schedule pattern. - * - * @param weekdays the weekdays value to set. - * @return the RecurrencePattern object itself. - */ - public RecurrencePattern withWeekdays(List weekdays) { - this.weekdays = weekdays; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hours() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property hours in model RecurrencePattern")); - } - if (minutes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property minutes in model RecurrencePattern")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecurrencePattern.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java index 791c35fc149d8..15271683aea6c 100644 --- 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 @@ -7,118 +7,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; +import java.util.List; -/** Recurrence schedule definition. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scheduleType") -@JsonTypeName("Recurrence") +/** The RecurrenceSchedule model. */ @Fluent -public final class RecurrenceSchedule extends ScheduleBase { +public final class RecurrenceSchedule { /* - * [Required] Specifies frequency with with which to trigger schedule + * [Required] List of hours for the schedule. */ - @JsonProperty(value = "frequency", required = true) - private RecurrenceFrequency frequency; + @JsonProperty(value = "hours", required = true) + private List hours; /* - * [Required] Specifies schedule interval in conjunction with frequency + * [Required] List of minutes for the schedule. */ - @JsonProperty(value = "interval", required = true) - private int interval; + @JsonProperty(value = "minutes", required = true) + private List minutes; /* - * Specifies the recurrence schedule pattern + * List of days for the schedule. */ - @JsonProperty(value = "pattern") - private RecurrencePattern pattern; + @JsonProperty(value = "weekDays") + private List weekDays; /** - * Get the frequency property: [Required] Specifies frequency with with which to trigger schedule. + * Get the hours property: [Required] List of hours for the schedule. * - * @return the frequency value. + * @return the hours value. */ - public RecurrenceFrequency frequency() { - return this.frequency; + public List hours() { + return this.hours; } /** - * Set the frequency property: [Required] Specifies frequency with with which to trigger schedule. + * Set the hours property: [Required] List of hours for the schedule. * - * @param frequency the frequency value to set. + * @param hours the hours value to set. * @return the RecurrenceSchedule object itself. */ - public RecurrenceSchedule withFrequency(RecurrenceFrequency frequency) { - this.frequency = frequency; + public RecurrenceSchedule withHours(List hours) { + this.hours = hours; return this; } /** - * Get the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * Get the minutes property: [Required] List of minutes for the schedule. * - * @return the interval value. + * @return the minutes value. */ - public int interval() { - return this.interval; + public List minutes() { + return this.minutes; } /** - * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * Set the minutes property: [Required] List of minutes for the schedule. * - * @param interval the interval value to set. + * @param minutes the minutes value to set. * @return the RecurrenceSchedule object itself. */ - public RecurrenceSchedule withInterval(int interval) { - this.interval = interval; + public RecurrenceSchedule withMinutes(List minutes) { + this.minutes = minutes; return this; } /** - * Get the pattern property: Specifies the recurrence schedule pattern. + * Get the weekDays property: List of days for the schedule. * - * @return the pattern value. + * @return the weekDays value. */ - public RecurrencePattern pattern() { - return this.pattern; + public List weekDays() { + return this.weekDays; } /** - * Set the pattern property: Specifies the recurrence schedule pattern. + * Set the weekDays property: List of days for the schedule. * - * @param pattern the pattern value to set. + * @param weekDays the weekDays value to set. * @return the RecurrenceSchedule object itself. */ - public RecurrenceSchedule withPattern(RecurrencePattern pattern) { - this.pattern = pattern; - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withScheduleStatus(ScheduleStatus scheduleStatus) { - super.withScheduleStatus(scheduleStatus); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withTimeZone(String timeZone) { - super.withTimeZone(timeZone); + public RecurrenceSchedule withWeekDays(List weekDays) { + this.weekDays = weekDays; return this; } @@ -127,16 +95,16 @@ public RecurrenceSchedule withTimeZone(String timeZone) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); - if (frequency() == null) { + if (hours() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property frequency in model RecurrenceSchedule")); + new IllegalArgumentException("Missing required property hours in model RecurrenceSchedule")); } - if (pattern() != null) { - pattern().validate(); + if (minutes() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property minutes in model RecurrenceSchedule")); } } 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 new file mode 100644 index 0000000000000..3c17a607231cc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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; + + /* + * [Required] The recurrence schedule. + */ + @JsonProperty(value = "schedule", required = true) + private RecurrenceSchedule schedule; + + /** + * 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: [Required] The recurrence schedule. + * + * @return the schedule value. + */ + public RecurrenceSchedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: [Required] 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property schedule in model RecurrenceTrigger")); + } else { + 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/RegenerateEndpointKeysRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java index e75663190cd87..86107e6a8d50b 100644 --- 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 @@ -12,8 +12,7 @@ @Fluent public final class RegenerateEndpointKeysRequest { /* - * [Required] Specification for which type of key to generate. Primary or - * Secondary. + * [Required] Specification for which type of key to generate. Primary or Secondary. */ @JsonProperty(value = "keyType", required = true) private KeyType keyType; 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 index c74055ad93d8a..7bd6a41733a51 100644 --- 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 @@ -15,18 +15,6 @@ @JsonTypeName("Regression") @Fluent public final class Regression extends AutoMLVertical { - /* - * Allowed models for regression task. - */ - @JsonProperty(value = "allowedModels") - private List allowedModels; - - /* - * Blocked models for regression task. - */ - @JsonProperty(value = "blockedModels") - private List blockedModels; - /* * Primary metric for regression task. */ @@ -34,10 +22,16 @@ public final class Regression extends AutoMLVertical { private RegressionPrimaryMetrics primaryMetric; /* - * Data inputs for AutoMLJob. + * Inputs for training phase for an AutoML Job. */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; + @JsonProperty(value = "trainingSettings") + private RegressionTrainingSettings trainingSettings; + + /* + * Columns to use for CVSplit data. + */ + @JsonProperty(value = "cvSplitColumnNames") + private List cvSplitColumnNames; /* * Featurization inputs needed for AutoML job. @@ -52,50 +46,46 @@ public final class Regression extends AutoMLVertical { private TableVerticalLimitSettings limitSettings; /* - * Inputs for training phase for an AutoML Job. + * Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. */ - @JsonProperty(value = "trainingSettings") - private TrainingSettings trainingSettings; + @JsonProperty(value = "nCrossValidations") + private NCrossValidations nCrossValidations; - /** - * Get the allowedModels property: Allowed models for regression task. - * - * @return the allowedModels value. + /* + * Test data input. */ - public List allowedModels() { - return this.allowedModels; - } + @JsonProperty(value = "testData") + private MLTableJobInput testData; - /** - * Set the allowedModels property: Allowed models for regression task. - * - * @param allowedModels the allowedModels value to set. - * @return the Regression object itself. + /* + * 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. */ - public Regression withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } + @JsonProperty(value = "testDataSize") + private Double testDataSize; - /** - * Get the blockedModels property: Blocked models for regression task. - * - * @return the blockedModels value. + /* + * Validation data inputs. */ - public List blockedModels() { - return this.blockedModels; - } + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; - /** - * Set the blockedModels property: Blocked models for regression task. - * - * @param blockedModels the blockedModels value to set. - * @return the Regression object itself. + /* + * 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. */ - public Regression withBlockedModels(List blockedModels) { - this.blockedModels = blockedModels; - return this; - } + @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; /** * Get the primaryMetric property: Primary metric for regression task. @@ -118,22 +108,42 @@ public Regression withPrimaryMetric(RegressionPrimaryMetrics primaryMetric) { } /** - * Get the dataSettings property: Data inputs for AutoMLJob. + * 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 dataSettings value. + * @return the cvSplitColumnNames value. */ - public TableVerticalDataSettings dataSettings() { - return this.dataSettings; + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; } /** - * Set the dataSettings property: Data inputs for AutoMLJob. + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @param dataSettings the dataSettings value to set. + * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Regression object itself. */ - public Regression withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; + public Regression withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; return this; } @@ -178,22 +188,130 @@ public Regression withLimitSettings(TableVerticalLimitSettings limitSettings) { } /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when + * validation dataset is not provided. * - * @return the trainingSettings value. + * @return the nCrossValidations value. */ - public TrainingSettings trainingSettings() { - return this.trainingSettings; + public NCrossValidations nCrossValidations() { + return this.nCrossValidations; } /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when + * validation dataset is not provided. * - * @param trainingSettings the trainingSettings value to set. + * @param nCrossValidations the nCrossValidations value to set. * @return the Regression object itself. */ - public Regression withTrainingSettings(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; + 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; } @@ -204,6 +322,20 @@ public Regression withLogVerbosity(LogVerbosity 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. * @@ -212,8 +344,8 @@ public Regression withLogVerbosity(LogVerbosity logVerbosity) { @Override public void validate() { super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); + if (trainingSettings() != null) { + trainingSettings().validate(); } if (featurizationSettings() != null) { featurizationSettings().validate(); @@ -221,8 +353,14 @@ public void validate() { if (limitSettings() != null) { limitSettings().validate(); } - if (trainingSettings() != null) { - trainingSettings().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/RegressionTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java new file mode 100644 index 0000000000000..d4db739dcc1d5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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/ResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java index bb76bf3d21d17..a824d38ddfd72 100644 --- 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 @@ -11,7 +11,7 @@ /** The ResourceConfiguration model. */ @Fluent -public final class ResourceConfiguration { +public class ResourceConfiguration { /* * Optional number of instances or nodes used by the compute target. */ 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 index a80079d702b5c..107b099bcf5a6 100644 --- 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 @@ -37,7 +37,9 @@ public interface ResourceQuota { ResourceName name(); /** - * Gets the limit property: Limit. The maximum permitted quota of the resource. + * Gets the limit property: Limit. + * + *

The maximum permitted quota of the resource. * * @return the limit value. */ 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 new file mode 100644 index 0000000000000..5d167d260064a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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/ScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java index 723b1a70a0888..71b27c681fca3 100644 --- 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 @@ -24,8 +24,7 @@ public final class ScaleSettings { private Integer minNodeCount; /* - * Node Idle Time before scaling down amlCompute. This string needs to be - * in the RFC Format. + * Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. */ @JsonProperty(value = "nodeIdleTimeBeforeScaleDown") private Duration nodeIdleTimeBeforeScaleDown; 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 new file mode 100644 index 0000000000000..7808d864dab94 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights 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/PartialKubernetesOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java similarity index 51% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialKubernetesOnlineDeployment.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java index 31d7dc680c47f..1438d29d72c5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialKubernetesOnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java @@ -5,21 +5,28 @@ 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; -/** Properties specific to a KubernetesOnlineDeployment. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") -@JsonTypeName("Kubernetes") +/** 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 final class PartialKubernetesOnlineDeployment extends PartialOnlineDeployment { +public class ScheduleActionBase { /** * 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/ScheduleActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java new file mode 100644 index 0000000000000..727cb62df9c51 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 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 index 1dcf02015d2ad..dd8b71757b312 100644 --- 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 @@ -6,131 +6,85 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -/** Base definition of a schedule. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "scheduleType", - defaultImpl = ScheduleBase.class) -@JsonTypeName("ScheduleBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Cron", value = CronSchedule.class), - @JsonSubTypes.Type(name = "Recurrence", value = RecurrenceSchedule.class) -}) +/** The ScheduleBase model. */ @Fluent -public class ScheduleBase { +public final class ScheduleBase { /* - * Specifies end time of schedule in ISO 8601 format. - * If not present, the schedule will run indefinitely + * The id property. */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; + @JsonProperty(value = "id") + private String id; /* - * Specifies the schedule's status + * The provisioningStatus property. */ - @JsonProperty(value = "scheduleStatus") - private ScheduleStatus scheduleStatus; + @JsonProperty(value = "provisioningStatus") + private ScheduleProvisioningState provisioningStatus; /* - * Specifies start time of schedule in ISO 8601 format. + * The status property. */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /* - * Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. - */ - @JsonProperty(value = "timeZone") - private String timeZone; - - /** - * Get the endTime property: Specifies end time of schedule in ISO 8601 format. If not present, the schedule will - * run indefinitely. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Specifies end time of schedule in ISO 8601 format. If not present, the schedule will - * run indefinitely. - * - * @param endTime the endTime value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } + @JsonProperty(value = "status") + private ScheduleStatus status; /** - * Get the scheduleStatus property: Specifies the schedule's status. + * Get the id property: The id property. * - * @return the scheduleStatus value. + * @return the id value. */ - public ScheduleStatus scheduleStatus() { - return this.scheduleStatus; + public String id() { + return this.id; } /** - * Set the scheduleStatus property: Specifies the schedule's status. + * Set the id property: The id property. * - * @param scheduleStatus the scheduleStatus value to set. + * @param id the id value to set. * @return the ScheduleBase object itself. */ - public ScheduleBase withScheduleStatus(ScheduleStatus scheduleStatus) { - this.scheduleStatus = scheduleStatus; + public ScheduleBase withId(String id) { + this.id = id; return this; } /** - * Get the startTime property: Specifies start time of schedule in ISO 8601 format. + * Get the provisioningStatus property: The provisioningStatus property. * - * @return the startTime value. + * @return the provisioningStatus value. */ - public OffsetDateTime startTime() { - return this.startTime; + public ScheduleProvisioningState provisioningStatus() { + return this.provisioningStatus; } /** - * Set the startTime property: Specifies start time of schedule in ISO 8601 format. + * Set the provisioningStatus property: The provisioningStatus property. * - * @param startTime the startTime value to set. + * @param provisioningStatus the provisioningStatus value to set. * @return the ScheduleBase object itself. */ - public ScheduleBase withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; + public ScheduleBase withProvisioningStatus(ScheduleProvisioningState provisioningStatus) { + this.provisioningStatus = provisioningStatus; return this; } /** - * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time - * zone format. + * Get the status property: The status property. * - * @return the timeZone value. + * @return the status value. */ - public String timeZone() { - return this.timeZone; + public ScheduleStatus status() { + return this.status; } /** - * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time - * zone format. + * Set the status property: The status property. * - * @param timeZone the timeZone value to set. + * @param status the status value to set. * @return the ScheduleBase object itself. */ - public ScheduleBase withTimeZone(String timeZone) { - this.timeZone = timeZone; + public ScheduleBase withStatus(ScheduleStatus status) { + this.status = status; return this; } 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 new file mode 100644 index 0000000000000..1435c1836a694 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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; + + /** + * 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 new file mode 100644 index 0000000000000..a3eaf712f1740 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 ScheduleProvisioningState. */ +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 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 new file mode 100644 index 0000000000000..8518418fc0171 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 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/PaginatedWorkspaceConnectionsList.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java similarity index 52% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedWorkspaceConnectionsList.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java index 91bcd2c2cfd8d..6aaef660dd882 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedWorkspaceConnectionsList.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java @@ -5,63 +5,62 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Paginated list of Workspace connection objects. */ +/** A paginated list of Schedule entities. */ @Fluent -public final class PaginatedWorkspaceConnectionsList { +public final class ScheduleResourceArmPaginatedResult { /* - * An array of Workspace connection objects. + * The link to the next page of Schedule objects. If null, there are no additional pages. */ - @JsonProperty(value = "value") - private List value; + @JsonProperty(value = "nextLink") + private String nextLink; /* - * A continuation link (absolute URI) to the next page of results in the - * list. + * An array of objects of type Schedule. */ - @JsonProperty(value = "nextLink") - private String nextLink; + @JsonProperty(value = "value") + private List value; /** - * Get the value property: An array of Workspace connection objects. + * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of Workspace connection objects. + * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. * - * @param value the value value to set. - * @return the PaginatedWorkspaceConnectionsList object itself. + * @param nextLink the nextLink value to set. + * @return the ScheduleResourceArmPaginatedResult object itself. */ - public PaginatedWorkspaceConnectionsList withValue(List value) { - this.value = value; + public ScheduleResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. + * Get the value property: An array of objects of type Schedule. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: A continuation link (absolute URI) to the next page of results in the list. + * Set the value property: An array of objects of type Schedule. * - * @param nextLink the nextLink value to set. - * @return the PaginatedWorkspaceConnectionsList object itself. + * @param value the value value to set. + * @return the ScheduleResourceArmPaginatedResult object itself. */ - public PaginatedWorkspaceConnectionsList withNextLink(String nextLink) { - this.nextLink = nextLink; + public ScheduleResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleType.java deleted file mode 100644 index d8e625b267119..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleType.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ScheduleType. */ -public final class ScheduleType extends ExpandableStringEnum { - /** Static value Cron for ScheduleType. */ - public static final ScheduleType CRON = fromString("Cron"); - - /** Static value Recurrence for ScheduleType. */ - public static final ScheduleType RECURRENCE = fromString("Recurrence"); - - /** - * Creates or finds a ScheduleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleType. - */ - @JsonCreator - public static ScheduleType fromString(String name) { - return fromString(name, ScheduleType.class); - } - - /** - * Gets known ScheduleType values. - * - * @return known ScheduleType values. - */ - public static Collection values() { - return values(ScheduleType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java new file mode 100644 index 0000000000000..039aea584c36f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 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 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/Sku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java index 27327ff52c42f..895ccde81c719 100644 --- 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 @@ -18,30 +18,28 @@ public final class Sku { 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. + * 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. + * 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. + * 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. + * 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; 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 index 54e18a3dfd38e..7322f0c9b6990 100644 --- 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 @@ -13,8 +13,7 @@ @Fluent public final class SkuResourceArmPaginatedResult { /* - * The link to the next page of SkuResource objects. If null, there are no - * additional pages. + * The link to the next page of SkuResource objects. If null, there are no additional pages. */ @JsonProperty(value = "nextLink") private String nextLink; 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 index 4500caef2b7e4..56e8a3d998a1b 100644 --- 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 @@ -12,15 +12,14 @@ @Fluent public final class SkuSetting { /* - * [Required] The name of the SKU. Ex - P3. It is typically a letter+number - * code. + * [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. + * 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; 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 index c49319c0b114b..656309507825f 100644 --- 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 @@ -36,6 +36,9 @@ public enum SkuTier { */ @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)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java new file mode 100644 index 0000000000000..9b6270eecd4fe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java @@ -0,0 +1,451 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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.List; +import java.util.Map; + +/** Spark job definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") +@JsonTypeName("Spark") +@Fluent +public final class SparkJob extends JobBaseProperties { + /* + * Archive files used in the job. + */ + @JsonProperty(value = "archives") + private List archives; + + /* + * Arguments for the job. + */ + @JsonProperty(value = "args") + private String args; + + /* + * [Required] ARM resource ID of the code asset. + */ + @JsonProperty(value = "codeId", required = true) + private String codeId; + + /* + * Spark configured properties. + */ + @JsonProperty(value = "conf") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map conf; + + /* + * [Required] The entry to execute on startup of the job. + */ + @JsonProperty(value = "entry", required = true) + private SparkJobEntry entry; + + /* + * The ARM resource ID of the Environment specification for the job. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * Files used in the job. + */ + @JsonProperty(value = "files") + private List files; + + /* + * 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; + + /* + * Jar files used in the job. + */ + @JsonProperty(value = "jars") + private List jars; + + /* + * 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; + + /* + * Python files used in the job. + */ + @JsonProperty(value = "pyFiles") + private List pyFiles; + + /* + * Compute Resource configuration for the job. + */ + @JsonProperty(value = "resources") + private SparkResourceConfiguration resources; + + /** + * Get the archives property: Archive files used in the job. + * + * @return the archives value. + */ + public List archives() { + return this.archives; + } + + /** + * Set the archives property: Archive files used in the job. + * + * @param archives the archives value to set. + * @return the SparkJob object itself. + */ + public SparkJob withArchives(List archives) { + this.archives = archives; + return this; + } + + /** + * Get the args property: Arguments for the job. + * + * @return the args value. + */ + public String args() { + return this.args; + } + + /** + * Set the args property: Arguments for the job. + * + * @param args the args value to set. + * @return the SparkJob object itself. + */ + public SparkJob withArgs(String args) { + this.args = args; + return this; + } + + /** + * Get the codeId property: [Required] ARM resource ID of the code asset. + * + * @return the codeId value. + */ + public String codeId() { + return this.codeId; + } + + /** + * Set the codeId property: [Required] ARM resource ID of the code asset. + * + * @param codeId the codeId value to set. + * @return the SparkJob object itself. + */ + public SparkJob withCodeId(String codeId) { + this.codeId = codeId; + return this; + } + + /** + * Get the conf property: Spark configured properties. + * + * @return the conf value. + */ + public Map conf() { + return this.conf; + } + + /** + * Set the conf property: Spark configured properties. + * + * @param conf the conf value to set. + * @return the SparkJob object itself. + */ + public SparkJob withConf(Map conf) { + this.conf = conf; + return this; + } + + /** + * Get the entry property: [Required] The entry to execute on startup of the job. + * + * @return the entry value. + */ + public SparkJobEntry entry() { + return this.entry; + } + + /** + * Set the entry property: [Required] The entry to execute on startup of the job. + * + * @param entry the entry value to set. + * @return the SparkJob object itself. + */ + public SparkJob withEntry(SparkJobEntry entry) { + this.entry = entry; + return this; + } + + /** + * Get the environmentId property: The ARM resource ID of the Environment specification for the job. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: The ARM resource ID of the Environment specification for the job. + * + * @param environmentId the environmentId value to set. + * @return the SparkJob object itself. + */ + public SparkJob withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the files property: Files used in the job. + * + * @return the files value. + */ + public List files() { + return this.files; + } + + /** + * Set the files property: Files used in the job. + * + * @param files the files value to set. + * @return the SparkJob object itself. + */ + public SparkJob withFiles(List files) { + this.files = files; + return this; + } + + /** + * Get the inputs property: Mapping of input data bindings used in the job. + * + * @return the inputs value. + */ + public Map inputs() { + return this.inputs; + } + + /** + * Set the inputs property: Mapping of input data bindings used in the job. + * + * @param inputs the inputs value to set. + * @return the SparkJob object itself. + */ + public SparkJob withInputs(Map inputs) { + this.inputs = inputs; + return this; + } + + /** + * Get the jars property: Jar files used in the job. + * + * @return the jars value. + */ + public List jars() { + return this.jars; + } + + /** + * Set the jars property: Jar files used in the job. + * + * @param jars the jars value to set. + * @return the SparkJob object itself. + */ + public SparkJob withJars(List jars) { + this.jars = jars; + return this; + } + + /** + * Get the outputs property: Mapping of output data bindings used in the job. + * + * @return the outputs value. + */ + public Map outputs() { + return this.outputs; + } + + /** + * Set the outputs property: Mapping of output data bindings used in the job. + * + * @param outputs the outputs value to set. + * @return the SparkJob object itself. + */ + public SparkJob withOutputs(Map outputs) { + this.outputs = outputs; + return this; + } + + /** + * Get the pyFiles property: Python files used in the job. + * + * @return the pyFiles value. + */ + public List pyFiles() { + return this.pyFiles; + } + + /** + * Set the pyFiles property: Python files used in the job. + * + * @param pyFiles the pyFiles value to set. + * @return the SparkJob object itself. + */ + public SparkJob withPyFiles(List pyFiles) { + this.pyFiles = pyFiles; + return this; + } + + /** + * Get the resources property: Compute Resource configuration for the job. + * + * @return the resources value. + */ + public SparkResourceConfiguration resources() { + return this.resources; + } + + /** + * Set the resources property: Compute Resource configuration for the job. + * + * @param resources the resources value to set. + * @return the SparkJob object itself. + */ + public SparkJob withResources(SparkResourceConfiguration resources) { + this.resources = resources; + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withComputeId(String computeId) { + super.withComputeId(computeId); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withServices(Map services) { + super.withServices(services); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public SparkJob 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 (codeId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property codeId in model SparkJob")); + } + if (entry() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property entry in model SparkJob")); + } else { + entry().validate(); + } + if (inputs() != null) { + inputs() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (outputs() != null) { + outputs() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (resources() != null) { + resources().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SparkJob.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java new file mode 100644 index 0000000000000..820dce3507b19 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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; + +/** Spark job entry point definition. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "sparkJobEntryType", + defaultImpl = SparkJobEntry.class) +@JsonTypeName("SparkJobEntry") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SparkJobPythonEntry", value = SparkJobPythonEntry.class), + @JsonSubTypes.Type(name = "SparkJobPythonEntry", value = SparkJobScalaEntry.class) +}) +@Immutable +public class SparkJobEntry { + /** + * 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/SparkJobEntryType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java new file mode 100644 index 0000000000000..ad09175be85d0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 SparkJobEntryType. */ +public final class SparkJobEntryType extends ExpandableStringEnum { + /** Static value SparkJobPythonEntry for SparkJobEntryType. */ + public static final SparkJobEntryType SPARK_JOB_PYTHON_ENTRY = fromString("SparkJobPythonEntry"); + + /** Static value SparkJobScalaEntry for SparkJobEntryType. */ + public static final SparkJobEntryType SPARK_JOB_SCALA_ENTRY = fromString("SparkJobScalaEntry"); + + /** + * Creates or finds a SparkJobEntryType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SparkJobEntryType. + */ + @JsonCreator + public static SparkJobEntryType fromString(String name) { + return fromString(name, SparkJobEntryType.class); + } + + /** + * Gets known SparkJobEntryType values. + * + * @return known SparkJobEntryType values. + */ + public static Collection values() { + return values(SparkJobEntryType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java new file mode 100644 index 0000000000000..564acd81f598a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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 SparkJobPythonEntry model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "sparkJobEntryType") +@JsonTypeName("SparkJobPythonEntry") +@Fluent +public final class SparkJobPythonEntry extends SparkJobEntry { + /* + * [Required] Relative python file path for job entry point. + */ + @JsonProperty(value = "file", required = true) + private String file; + + /** + * Get the file property: [Required] Relative python file path for job entry point. + * + * @return the file value. + */ + public String file() { + return this.file; + } + + /** + * Set the file property: [Required] Relative python file path for job entry point. + * + * @param file the file value to set. + * @return the SparkJobPythonEntry object itself. + */ + public SparkJobPythonEntry withFile(String file) { + this.file = file; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (file() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property file in model SparkJobPythonEntry")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SparkJobPythonEntry.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java new file mode 100644 index 0000000000000..5b8c815b92745 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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 SparkJobScalaEntry model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "sparkJobEntryType") +@JsonTypeName("SparkJobPythonEntry") +@Fluent +public final class SparkJobScalaEntry extends SparkJobEntry { + /* + * [Required] Scala class name used as entry point. + */ + @JsonProperty(value = "className", required = true) + private String className; + + /** + * Get the className property: [Required] Scala class name used as entry point. + * + * @return the className value. + */ + public String className() { + return this.className; + } + + /** + * Set the className property: [Required] Scala class name used as entry point. + * + * @param className the className value to set. + * @return the SparkJobScalaEntry object itself. + */ + public SparkJobScalaEntry withClassName(String className) { + this.className = className; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (className() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property className in model SparkJobScalaEntry")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SparkJobScalaEntry.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java new file mode 100644 index 0000000000000..a6195fa92514a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 SparkResourceConfiguration model. */ +@Fluent +public final class SparkResourceConfiguration { + /* + * Optional type of VM used as supported by the compute target. + */ + @JsonProperty(value = "instanceType") + private String instanceType; + + /* + * Version of spark runtime used for the job. + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /** + * Get the instanceType property: Optional type of VM used as supported by the compute target. + * + * @return the instanceType value. + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the instanceType property: Optional type of VM used as supported by the compute target. + * + * @param instanceType the instanceType value to set. + * @return the SparkResourceConfiguration object itself. + */ + public SparkResourceConfiguration withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + + /** + * Get the runtimeVersion property: Version of spark runtime used for the job. + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: Version of spark runtime used for the job. + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the SparkResourceConfiguration object itself. + */ + public SparkResourceConfiguration withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 0000000000000..54172d8508533 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 SslConfigStatus. */ +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 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 index 656dd43a46d3b..98a81724cc50d 100644 --- 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 @@ -14,7 +14,7 @@ public final class SslConfiguration { * Enable or disable ssl for scoring */ @JsonProperty(value = "status") - private SslConfigurationStatus status; + private SslConfigStatus status; /* * Cert data @@ -51,7 +51,7 @@ public final class SslConfiguration { * * @return the status value. */ - public SslConfigurationStatus status() { + public SslConfigStatus status() { return this.status; } @@ -61,7 +61,7 @@ public SslConfigurationStatus status() { * @param status the status value to set. * @return the SslConfiguration object itself. */ - public SslConfiguration withStatus(SslConfigurationStatus status) { + public SslConfiguration withStatus(SslConfigStatus status) { this.status = status; return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigurationStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigurationStatus.java deleted file mode 100644 index ee60c5c32bbd1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigurationStatus.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SslConfigurationStatus. */ -public final class SslConfigurationStatus extends ExpandableStringEnum { - /** Static value Disabled for SslConfigurationStatus. */ - public static final SslConfigurationStatus DISABLED = fromString("Disabled"); - - /** Static value Enabled for SslConfigurationStatus. */ - public static final SslConfigurationStatus ENABLED = fromString("Enabled"); - - /** Static value Auto for SslConfigurationStatus. */ - public static final SslConfigurationStatus AUTO = fromString("Auto"); - - /** - * Creates or finds a SslConfigurationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SslConfigurationStatus. - */ - @JsonCreator - public static SslConfigurationStatus fromString(String name) { - return fromString(name, SslConfigurationStatus.class); - } - - /** - * Gets known SslConfigurationStatus values. - * - * @return known SslConfigurationStatus values. - */ - public static Collection values() { - return values(SslConfigurationStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java index 39aeadd4f94e9..d4f1b4dcfdc6e 100644 --- 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 @@ -17,16 +17,14 @@ public final class StackEnsembleSettings { 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. + * 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. + * The meta-learner is a model trained on the output of the individual heterogeneous models. */ @JsonProperty(value = "stackMetaLearnerType") private StackMetaLearnerType stackMetaLearnerType; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessage.java new file mode 100644 index 0000000000000..585bb8d638701 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessage.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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.time.OffsetDateTime; + +/** Active message associated with project. */ +@Immutable +public final class StatusMessage { + /* + * Service-defined message code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Time in UTC at which the message was created. + */ + @JsonProperty(value = "createdDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateTime; + + /* + * Severity level of message. + */ + @JsonProperty(value = "level", access = JsonProperty.Access.WRITE_ONLY) + private StatusMessageLevel level; + + /* + * A human-readable representation of the message code. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the code property: Service-defined message code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the createdDateTime property: Time in UTC at which the message was created. + * + * @return the createdDateTime value. + */ + public OffsetDateTime createdDateTime() { + return this.createdDateTime; + } + + /** + * Get the level property: Severity level of message. + * + * @return the level value. + */ + public StatusMessageLevel level() { + return this.level; + } + + /** + * Get the message property: A human-readable representation of the message code. + * + * @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/StatusMessageLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessageLevel.java new file mode 100644 index 0000000000000..f4b3a8214d7d8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessageLevel.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 StatusMessageLevel. */ +public final class StatusMessageLevel extends ExpandableStringEnum { + /** Static value Error for StatusMessageLevel. */ + public static final StatusMessageLevel ERROR = fromString("Error"); + + /** Static value Information for StatusMessageLevel. */ + public static final StatusMessageLevel INFORMATION = fromString("Information"); + + /** Static value Warning for StatusMessageLevel. */ + public static final StatusMessageLevel WARNING = fromString("Warning"); + + /** + * Creates or finds a StatusMessageLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding StatusMessageLevel. + */ + @JsonCreator + public static StatusMessageLevel fromString(String name) { + return fromString(name, StatusMessageLevel.class); + } + + /** + * Gets known StatusMessageLevel values. + * + * @return known StatusMessageLevel values. + */ + public static Collection values() { + return values(StatusMessageLevel.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 index 6240a092e4c0c..64ac3fe8462b7 100644 --- 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 @@ -16,10 +16,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("Sweep") @Fluent -public final class SweepJob extends JobBaseDetails { +public final class SweepJob extends JobBaseProperties { /* - * Early termination policies enable canceling poor-performing runs before - * they complete + * Early termination policies enable canceling poor-performing runs before they complete */ @JsonProperty(value = "earlyTermination") private EarlyTerminationPolicy earlyTermination; @@ -57,8 +56,8 @@ public final class SweepJob extends JobBaseDetails { private SamplingAlgorithm samplingAlgorithm; /* - * [Required] A dictionary containing each parameter and its distribution. - * The dictionary key is the name of the parameter + * [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; @@ -233,6 +232,13 @@ public SweepJob withTrial(TrialComponent trial) { return this; } + /** {@inheritDoc} */ + @Override + public SweepJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + /** {@inheritDoc} */ @Override public SweepJob withComputeId(String computeId) { @@ -268,13 +274,6 @@ public SweepJob withIsArchived(Boolean isArchived) { return this; } - /** {@inheritDoc} */ - @Override - public SweepJob withSchedule(ScheduleBase schedule) { - super.withSchedule(schedule); - return this; - } - /** {@inheritDoc} */ @Override public SweepJob withServices(Map services) { 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 index 56816059ee7bf..89e4bda58e9f3 100644 --- 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 @@ -6,15 +6,16 @@ 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 { /* - * Data inputs for AutoMLJob. + * Columns to use for CVSplit data. */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; + @JsonProperty(value = "cvSplitColumnNames") + private List cvSplitColumnNames; /* * Featurization inputs needed for AutoML job. @@ -29,28 +30,64 @@ public class TableVertical { private TableVerticalLimitSettings limitSettings; /* - * Inputs for training phase for an AutoML Job. + * Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. */ - @JsonProperty(value = "trainingSettings") - private TrainingSettings trainingSettings; + @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; /** - * Get the dataSettings property: Data inputs for AutoMLJob. + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @return the dataSettings value. + * @return the cvSplitColumnNames value. */ - public TableVerticalDataSettings dataSettings() { - return this.dataSettings; + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; } /** - * Set the dataSettings property: Data inputs for AutoMLJob. + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @param dataSettings the dataSettings value to set. + * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the TableVertical object itself. */ - public TableVertical withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; + public TableVertical withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; return this; } @@ -95,22 +132,130 @@ public TableVertical withLimitSettings(TableVerticalLimitSettings limitSettings) } /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * 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 trainingSettings value. + * @return the testDataSize value. */ - public TrainingSettings trainingSettings() { - return this.trainingSettings; + public Double testDataSize() { + return this.testDataSize; } /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * 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 trainingSettings the trainingSettings value to set. + * @param testDataSize the testDataSize value to set. * @return the TableVertical object itself. */ - public TableVertical withTrainingSettings(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; + 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; } @@ -120,17 +265,20 @@ public TableVertical withTrainingSettings(TrainingSettings trainingSettings) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (dataSettings() != null) { - dataSettings().validate(); - } if (featurizationSettings() != null) { featurizationSettings().validate(); } if (limitSettings() != null) { limitSettings().validate(); } - if (trainingSettings() != null) { - trainingSettings().validate(); + 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/TableVerticalDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalDataSettings.java deleted file mode 100644 index ac98e0ce4ded6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalDataSettings.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Class for data inputs. */ -@Fluent -public final class TableVerticalDataSettings extends DataSettings { - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private TableVerticalValidationDataSettings validationData; - - /* - * The name of the sample weight column. Automated ML supports a weighted - * column as an input, causing rows in the data to be weighted up or down. - */ - @JsonProperty(value = "weightColumnName") - private String weightColumnName; - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public TableVerticalValidationDataSettings validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TableVerticalDataSettings object itself. - */ - public TableVerticalDataSettings withValidationData(TableVerticalValidationDataSettings validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the TableVerticalDataSettings object itself. - */ - public TableVerticalDataSettings withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalDataSettings withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalDataSettings withTestData(TestDataSettings testData) { - super.withTestData(testData); - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalDataSettings withTrainingData(TrainingDataSettings trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (validationData() != null) { - validationData().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java index 03ae45a3adca3..5b6f212e46270 100644 --- 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 @@ -17,22 +17,15 @@ public final class TableVerticalFeaturizationSettings extends FeaturizationSetti * These transformers shall not be used in featurization. */ @JsonProperty(value = "blockedTransformers") - private List blockedTransformers; + private List blockedTransformers; /* - * Dictionary of column name and its type (int, float, string, datetime - * etc). + * Dictionary of column name and its type (int, float, string, datetime etc). */ @JsonProperty(value = "columnNameAndTypes") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map columnNameAndTypes; - /* - * Columns to be dropped from data during featurization. - */ - @JsonProperty(value = "dropColumns") - private List dropColumns; - /* * Determines whether to use Dnn based featurizers for data featurization. */ @@ -40,20 +33,17 @@ public final class TableVerticalFeaturizationSettings extends FeaturizationSetti 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. + * 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. + * 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. + * 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) @@ -64,7 +54,7 @@ public final class TableVerticalFeaturizationSettings extends FeaturizationSetti * * @return the blockedTransformers value. */ - public List blockedTransformers() { + public List blockedTransformers() { return this.blockedTransformers; } @@ -74,7 +64,7 @@ public List blockedTransformers() { * @param blockedTransformers the blockedTransformers value to set. * @return the TableVerticalFeaturizationSettings object itself. */ - public TableVerticalFeaturizationSettings withBlockedTransformers(List blockedTransformers) { + public TableVerticalFeaturizationSettings withBlockedTransformers(List blockedTransformers) { this.blockedTransformers = blockedTransformers; return this; } @@ -99,26 +89,6 @@ public TableVerticalFeaturizationSettings withColumnNameAndTypes(Map dropColumns() { - return this.dropColumns; - } - - /** - * Set the dropColumns property: Columns to be dropped from data during featurization. - * - * @param dropColumns the dropColumns value to set. - * @return the TableVerticalFeaturizationSettings object itself. - */ - public TableVerticalFeaturizationSettings withDropColumns(List dropColumns) { - this.dropColumns = dropColumns; - return this; - } - /** * Get the enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. * 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 index 3b6fa66980aee..0f8f51d0e0472 100644 --- 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 @@ -12,8 +12,8 @@ @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. + * 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; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalValidationDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalValidationDataSettings.java deleted file mode 100644 index 510c3ec340773..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalValidationDataSettings.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Validation settings for AutoML Table vertical tasks - Classification/Regression/Forecasting. */ -@Fluent -public final class TableVerticalValidationDataSettings extends ValidationDataSettings { - /* - * Columns to use for CVSplit data. - */ - @JsonProperty(value = "cvSplitColumnNames") - private List cvSplitColumnNames; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - @JsonProperty(value = "nCrossValidations") - private NCrossValidations nCrossValidations; - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the TableVerticalValidationDataSettings object itself. - */ - public TableVerticalValidationDataSettings withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the TableVerticalValidationDataSettings object itself. - */ - public TableVerticalValidationDataSettings withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalValidationDataSettings withData(MLTableJobInput data) { - super.withData(data); - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalValidationDataSettings withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java index 883674640ed29..0e094241c9e71 100644 --- 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 @@ -16,8 +16,7 @@ @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. + * 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; @@ -29,8 +28,7 @@ public final class TargetUtilizationScaleSettings extends OnlineScaleSettings { private Integer minInstances; /* - * The polling interval in ISO 8691 format. Only supports duration with - * precision as low as Seconds. + * The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. */ @JsonProperty(value = "pollingInterval") private Duration pollingInterval; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TestDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TestDataSettings.java deleted file mode 100644 index 53e832a6dfcd0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TestDataSettings.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Test data inputs. */ -@Fluent -public final class TestDataSettings { - /* - * Test data MLTable. - */ - @JsonProperty(value = "data") - private MLTableJobInput data; - - /* - * The fraction of test dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "testDataSize") - private Double testDataSize; - - /** - * Get the data property: Test data MLTable. - * - * @return the data value. - */ - public MLTableJobInput data() { - return this.data; - } - - /** - * Set the data property: Test data MLTable. - * - * @param data the data value to set. - * @return the TestDataSettings object itself. - */ - public TestDataSettings withData(MLTableJobInput data) { - this.data = data; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the TestDataSettings object itself. - */ - public TestDataSettings withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (data() != null) { - data().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextAnnotationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextAnnotationType.java new file mode 100644 index 0000000000000..a04e3f20d38c9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextAnnotationType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 TextAnnotationType. */ +public final class TextAnnotationType extends ExpandableStringEnum { + /** Static value Classification for TextAnnotationType. */ + public static final TextAnnotationType CLASSIFICATION = fromString("Classification"); + + /** Static value NamedEntityRecognition for TextAnnotationType. */ + public static final TextAnnotationType NAMED_ENTITY_RECOGNITION = fromString("NamedEntityRecognition"); + + /** + * Creates or finds a TextAnnotationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TextAnnotationType. + */ + @JsonCreator + public static TextAnnotationType fromString(String name) { + return fromString(name, TextAnnotationType.class); + } + + /** + * Gets known TextAnnotationType values. + * + * @return known TextAnnotationType values. + */ + public static Collection values() { + return values(TextAnnotationType.class); + } +} 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 index fcc2d0bc84622..5523f84653566 100644 --- 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 @@ -20,12 +20,6 @@ public final class TextClassification extends AutoMLVertical { @JsonProperty(value = "primaryMetric") private ClassificationPrimaryMetrics primaryMetric; - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - /* * Featurization inputs needed for AutoML job. */ @@ -38,6 +32,12 @@ public final class TextClassification extends AutoMLVertical { @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Validation data inputs. + */ + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; + /** * Get the primaryMetric property: Primary metric for Text-Classification task. * @@ -58,26 +58,6 @@ public TextClassification withPrimaryMetric(ClassificationPrimaryMetrics primary return this; } - /** - * Get the dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the TextClassification object itself. - */ - public TextClassification withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - return this; - } - /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * @@ -118,6 +98,26 @@ public TextClassification withLimitSettings(NlpVerticalLimitSettings limitSettin 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) { @@ -125,6 +125,20 @@ public TextClassification withLogVerbosity(LogVerbosity 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. * @@ -133,14 +147,14 @@ public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { @Override public void validate() { super.validate(); - if (dataSettings() != null) { - dataSettings().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 index 0b35a8b86b92b..35dec39fcdcca 100644 --- 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 @@ -16,18 +16,11 @@ 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. + * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. */ @JsonProperty(value = "primaryMetric", access = JsonProperty.Access.WRITE_ONLY) private ClassificationMultilabelPrimaryMetrics primaryMetric; - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - /* * Featurization inputs needed for AutoML job. */ @@ -40,6 +33,12 @@ public final class TextClassificationMultilabel extends AutoMLVertical { @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Validation data inputs. + */ + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; + /** * 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. @@ -50,26 +49,6 @@ public ClassificationMultilabelPrimaryMetrics primaryMetric() { return this.primaryMetric; } - /** - * Get the dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the TextClassificationMultilabel object itself. - */ - public TextClassificationMultilabel withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - return this; - } - /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * @@ -111,6 +90,26 @@ public TextClassificationMultilabel withLimitSettings(NlpVerticalLimitSettings l 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) { @@ -118,6 +117,20 @@ public TextClassificationMultilabel withLogVerbosity(LogVerbosity 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. * @@ -126,14 +139,14 @@ public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) @Override public void validate() { super.validate(); - if (dataSettings() != null) { - dataSettings().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 index aa93b9e1c0bab..f7e94d5c8cca4 100644 --- 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 @@ -16,18 +16,11 @@ 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. + * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. */ @JsonProperty(value = "primaryMetric", access = JsonProperty.Access.WRITE_ONLY) private ClassificationPrimaryMetrics primaryMetric; - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - /* * Featurization inputs needed for AutoML job. */ @@ -40,6 +33,12 @@ public final class TextNer extends AutoMLVertical { @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Validation data inputs. + */ + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; + /** * Get the primaryMetric property: Primary metric for Text-NER task. Only 'Accuracy' is supported for Text-NER, so * user need not set this explicitly. @@ -50,26 +49,6 @@ public ClassificationPrimaryMetrics primaryMetric() { return this.primaryMetric; } - /** - * Get the dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the TextNer object itself. - */ - public TextNer withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - return this; - } - /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * @@ -110,6 +89,26 @@ public TextNer withLimitSettings(NlpVerticalLimitSettings 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) { @@ -117,6 +116,20 @@ public TextNer withLogVerbosity(LogVerbosity 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. * @@ -125,14 +138,14 @@ public TextNer withLogVerbosity(LogVerbosity logVerbosity) { @Override public void validate() { super.validate(); - if (dataSettings() != null) { - dataSettings().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/TmpfsOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java new file mode 100644 index 0000000000000..e500ba455c30e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 TmpfsOptions model. */ +@Fluent +public final class TmpfsOptions { + /* + * Mention the Tmpfs size + */ + @JsonProperty(value = "size") + private Integer size; + + /** + * Get the size property: Mention the Tmpfs size. + * + * @return the size value. + */ + public Integer size() { + return this.size; + } + + /** + * Set the size property: Mention the Tmpfs size. + * + * @param size the size value to set. + * @return the TmpfsOptions object itself. + */ + public TmpfsOptions withSize(Integer size) { + this.size = size; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingDataSettings.java deleted file mode 100644 index a6c1a31f294bd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingDataSettings.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Training data input. */ -@Fluent -public final class TrainingDataSettings { - /* - * [Required] Training data MLTable. - */ - @JsonProperty(value = "data", required = true) - private MLTableJobInput data; - - /** - * Get the data property: [Required] Training data MLTable. - * - * @return the data value. - */ - public MLTableJobInput data() { - return this.data; - } - - /** - * Set the data property: [Required] Training data MLTable. - * - * @param data the data value to set. - * @return the TrainingDataSettings object itself. - */ - public TrainingDataSettings withData(MLTableJobInput data) { - this.data = data; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (data() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property data in model TrainingDataSettings")); - } else { - data().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TrainingDataSettings.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java index 6c2ef2bde7b63..89e5a4783219b 100644 --- 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 @@ -10,7 +10,7 @@ /** Training related configuration. */ @Fluent -public final class TrainingSettings { +public class TrainingSettings { /* * Enable recommendation of DNN models. */ @@ -42,10 +42,9 @@ public final class TrainingSettings { 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. + * 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; 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 index 5a343d33d2df3..1061482869071 100644 --- 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 @@ -20,22 +20,19 @@ public final class TrialComponent { private String codeId; /* - * [Required] The command to execute on startup of the job. eg. "python - * train.py" + * [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. + * 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. + * [Required] The ARM resource ID of the Environment specification for the job. */ @JsonProperty(value = "environmentId", required = true) private String environmentId; @@ -51,7 +48,7 @@ public final class TrialComponent { * Compute Resource configuration for the job. */ @JsonProperty(value = "resources") - private ResourceConfiguration resources; + private JobResourceConfiguration resources; /** * Get the codeId property: ARM resource ID of the code asset. @@ -160,7 +157,7 @@ public TrialComponent withEnvironmentVariables(Map environmentVa * * @return the resources value. */ - public ResourceConfiguration resources() { + public JobResourceConfiguration resources() { return this.resources; } @@ -170,7 +167,7 @@ public ResourceConfiguration resources() { * @param resources the resources value to set. * @return the TrialComponent object itself. */ - public TrialComponent withResources(ResourceConfiguration resources) { + public TrialComponent withResources(JobResourceConfiguration resources) { this.resources = resources; return this; } 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 new file mode 100644 index 0000000000000..5b2c108b19d4f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 = "Cron", value = CronTrigger.class), + @JsonSubTypes.Type(name = "Recurrence", value = RecurrenceTrigger.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; + + /** + * 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 new file mode 100644 index 0000000000000..9e43266223ea2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 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 index dde01e0b5fa95..ea24f13be7d96 100644 --- 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 @@ -12,7 +12,7 @@ /** The TritonModelJobInput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("TritonModel") +@JsonTypeName("triton_model") @Fluent public final class TritonModelJobInput extends JobInput { /* 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 index 87b7ab40bfdd2..d62f2ccdf2b1f 100644 --- 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 @@ -11,7 +11,7 @@ /** The TritonModelJobOutput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("TritonModel") +@JsonTypeName("triton_model") @Fluent public final class TritonModelJobOutput extends JobOutput { /* 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 index 7f9aaa6d4f25d..56325817b8d98 100644 --- 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 @@ -23,7 +23,9 @@ public final class UpdateWorkspaceQuotas { private String type; /* - * Limit. The maximum permitted quota of the resource. + * Limit. + * + * The maximum permitted quota of the resource. */ @JsonProperty(value = "limit") private Long limit; @@ -35,7 +37,9 @@ public final class UpdateWorkspaceQuotas { private QuotaUnit unit; /* - * Update Workspace Quota Status. Status of update workspace quota. + * Update Workspace Quota Status. + * + * Status of update workspace quota. */ @JsonProperty(value = "status") private Status status; @@ -59,7 +63,9 @@ public String type() { } /** - * Get the limit property: Limit. The maximum permitted quota of the resource. + * Get the limit property: Limit. + * + *

The maximum permitted quota of the resource. * * @return the limit value. */ @@ -68,7 +74,9 @@ public Long limit() { } /** - * Set the limit property: Limit. The maximum permitted quota of the resource. + * Set the limit property: Limit. + * + *

The maximum permitted quota of the resource. * * @param limit the limit value to set. * @return the UpdateWorkspaceQuotas object itself. @@ -88,7 +96,9 @@ public QuotaUnit unit() { } /** - * Get the status property: Update Workspace Quota Status. Status of update workspace quota. + * Get the status property: Update Workspace Quota Status. + * + *

Status of update workspace quota. * * @return the status value. */ @@ -97,7 +107,9 @@ public Status status() { } /** - * Set the status property: Update Workspace Quota Status. Status of update workspace quota. + * 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. 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 index e604e249f90ec..19e2ce991b8e4 100644 --- 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 @@ -11,9 +11,9 @@ /** uri-file data version entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") -@JsonTypeName("UriFile") +@JsonTypeName("uri_file") @Fluent -public final class UriFileDataVersion extends DataVersionBaseDetails { +public final class UriFileDataVersion extends DataVersionBaseProperties { /** {@inheritDoc} */ @Override public UriFileDataVersion withDataUri(String dataUri) { 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 index 88e20a573df06..e16ce0c8718cf 100644 --- 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 @@ -12,7 +12,7 @@ /** The UriFileJobInput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("UriFile") +@JsonTypeName("uri_file") @Fluent public final class UriFileJobInput extends JobInput { /* 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 index 559611b1fb637..eb67b36606b74 100644 --- 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 @@ -11,7 +11,7 @@ /** The UriFileJobOutput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("UriFile") +@JsonTypeName("uri_file") @Fluent public final class UriFileJobOutput extends JobOutput { /* 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 index 2d20dd82ada17..49a701f4d5654 100644 --- 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 @@ -11,9 +11,9 @@ /** uri-folder data version entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") -@JsonTypeName("UriFolder") +@JsonTypeName("uri_folder") @Fluent -public final class UriFolderDataVersion extends DataVersionBaseDetails { +public final class UriFolderDataVersion extends DataVersionBaseProperties { /** {@inheritDoc} */ @Override public UriFolderDataVersion withDataUri(String dataUri) { 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 index 7220e2d1e41e5..a79c1aba55817 100644 --- 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 @@ -12,7 +12,7 @@ /** The UriFolderJobInput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("UriFolder") +@JsonTypeName("uri_folder") @Fluent public final class UriFolderJobInput extends JobInput { /* 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 index dbe331b23982c..35868b6012013 100644 --- 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 @@ -11,7 +11,7 @@ /** The UriFolderJobOutput model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("UriFolder") +@JsonTypeName("uri_folder") @Fluent public final class UriFolderJobOutput extends JobOutput { /* 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 index 9d855264fb741..e15c3d7aa613f 100644 --- 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 @@ -12,27 +12,33 @@ @Fluent public final class UserAccountCredentials { /* - * User name. Name of the administrator user account which can be used to - * SSH to nodes. + * 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. + * SSH public key. + * + * SSH public key of the administrator user account. */ @JsonProperty(value = "adminUserSshPublicKey") private String adminUserSshPublicKey; /* - * Password. Password of the administrator user account. + * Password. + * + * Password of the administrator user account. */ @JsonProperty(value = "adminUserPassword") private String adminUserPassword; /** - * Get the adminUsername property: User name. Name of the administrator user account which can be used to SSH to - * nodes. + * Get the adminUsername property: User name. + * + *

Name of the administrator user account which can be used to SSH to nodes. * * @return the adminUsername value. */ @@ -41,8 +47,9 @@ public String adminUsername() { } /** - * Set the adminUsername property: User name. Name of the administrator user account which can be used to SSH to - * nodes. + * 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. @@ -53,7 +60,9 @@ public UserAccountCredentials withAdminUsername(String adminUsername) { } /** - * Get the adminUserSshPublicKey property: SSH public key. SSH public key of the administrator user account. + * Get the adminUserSshPublicKey property: SSH public key. + * + *

SSH public key of the administrator user account. * * @return the adminUserSshPublicKey value. */ @@ -62,7 +71,9 @@ public String adminUserSshPublicKey() { } /** - * Set the adminUserSshPublicKey property: SSH public key. SSH public key of the administrator user account. + * 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. @@ -73,7 +84,9 @@ public UserAccountCredentials withAdminUserSshPublicKey(String adminUserSshPubli } /** - * Get the adminUserPassword property: Password. Password of the administrator user account. + * Get the adminUserPassword property: Password. + * + *

Password of the administrator user account. * * @return the adminUserPassword value. */ @@ -82,7 +95,9 @@ public String adminUserPassword() { } /** - * Set the adminUserPassword property: Password. Password of the administrator user account. + * Set the adminUserPassword property: Password. + * + *

Password of the administrator user account. * * @param adminUserPassword the adminUserPassword value to set. * @return the UserAccountCredentials object itself. 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 new file mode 100644 index 0000000000000..d1cafa1695bb4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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/ValidationDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationDataSettings.java deleted file mode 100644 index 9e1610f594e35..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationDataSettings.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Validation settings. */ -@Fluent -public class ValidationDataSettings { - /* - * Validation data MLTable. - */ - @JsonProperty(value = "data") - private MLTableJobInput data; - - /* - * The fraction of training dataset that needs to be set aside for - * validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /** - * Get the data property: Validation data MLTable. - * - * @return the data value. - */ - public MLTableJobInput data() { - return this.data; - } - - /** - * Set the data property: Validation data MLTable. - * - * @param data the data value to set. - * @return the ValidationDataSettings object itself. - */ - public ValidationDataSettings withData(MLTableJobInput data) { - this.data = data; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ValidationDataSettings object itself. - */ - public ValidationDataSettings withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (data() != null) { - data().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java index bc3080416502c..876c59ea32de6 100644 --- 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 @@ -12,61 +12,73 @@ @Fluent public final class VirtualMachineSize { /* - * Virtual Machine size name The name of the virtual machine size. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * Premium IO supported + * + * Specifies if the virtual machine size supports premium IO. */ @JsonProperty(value = "premiumIO", access = JsonProperty.Access.WRITE_ONLY) private Boolean premiumIO; @@ -78,14 +90,17 @@ public final class VirtualMachineSize { private EstimatedVMPrices estimatedVMPrices; /* - * Supported Compute Types Specifies the compute types supported by the - * virtual machine size. + * Supported Compute Types + * + * Specifies the compute types supported by the virtual machine size. */ @JsonProperty(value = "supportedComputeTypes") private List supportedComputeTypes; /** - * Get the name property: Virtual Machine size name The name of the virtual machine size. + * Get the name property: Virtual Machine size name + * + *

The name of the virtual machine size. * * @return the name value. */ @@ -94,7 +109,9 @@ public String name() { } /** - * Get the family property: Virtual Machine family name The family name of the virtual machine size. + * Get the family property: Virtual Machine family name + * + *

The family name of the virtual machine size. * * @return the family value. */ @@ -103,7 +120,9 @@ public String family() { } /** - * Get the vCPUs property: Number of vPUs The number of vCPUs supported by the virtual machine size. + * Get the vCPUs property: Number of vPUs + * + *

The number of vCPUs supported by the virtual machine size. * * @return the vCPUs value. */ @@ -112,7 +131,9 @@ public Integer vCPUs() { } /** - * Get the gpus property: Number of gPUs The number of gPUs supported by the virtual machine size. + * Get the gpus property: Number of gPUs + * + *

The number of gPUs supported by the virtual machine size. * * @return the gpus value. */ @@ -121,7 +142,9 @@ public Integer gpus() { } /** - * Get the osVhdSizeMB property: OS VHD Disk size The OS VHD disk size, in MB, allowed by the virtual machine size. + * 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. */ @@ -130,8 +153,9 @@ public Integer osVhdSizeMB() { } /** - * Get the maxResourceVolumeMB property: Resource volume size The resource volume size, in MB, allowed by the - * virtual machine size. + * Get the maxResourceVolumeMB property: Resource volume size + * + *

The resource volume size, in MB, allowed by the virtual machine size. * * @return the maxResourceVolumeMB value. */ @@ -140,7 +164,9 @@ public Integer maxResourceVolumeMB() { } /** - * Get the memoryGB property: Memory size The amount of memory, in GB, supported by the virtual machine size. + * Get the memoryGB property: Memory size + * + *

The amount of memory, in GB, supported by the virtual machine size. * * @return the memoryGB value. */ @@ -149,8 +175,9 @@ public Double memoryGB() { } /** - * Get the lowPriorityCapable property: Low priority capable Specifies if the virtual machine size supports low - * priority VMs. + * Get the lowPriorityCapable property: Low priority capable + * + *

Specifies if the virtual machine size supports low priority VMs. * * @return the lowPriorityCapable value. */ @@ -159,7 +186,9 @@ public Boolean lowPriorityCapable() { } /** - * Get the premiumIO property: Premium IO supported Specifies if the virtual machine size supports premium IO. + * Get the premiumIO property: Premium IO supported + * + *

Specifies if the virtual machine size supports premium IO. * * @return the premiumIO value. */ @@ -188,8 +217,9 @@ public VirtualMachineSize withEstimatedVMPrices(EstimatedVMPrices estimatedVMPri } /** - * Get the supportedComputeTypes property: Supported Compute Types Specifies the compute types supported by the - * virtual machine size. + * Get the supportedComputeTypes property: Supported Compute Types + * + *

Specifies the compute types supported by the virtual machine size. * * @return the supportedComputeTypes value. */ @@ -198,8 +228,9 @@ public List supportedComputeTypes() { } /** - * Set the supportedComputeTypes property: Supported Compute Types Specifies the compute types supported by the - * virtual machine size. + * 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java new file mode 100644 index 0000000000000..a88532ef174fa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 VolumeDefinition model. */ +@Fluent +public final class VolumeDefinition { + /* + * Type of Volume Definition + * + * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe + */ + @JsonProperty(value = "type") + private VolumeDefinitionType type; + + /* + * Indicate whether to mount volume as readOnly. Default value for this is false. + */ + @JsonProperty(value = "readOnly") + private Boolean readOnly; + + /* + * Source of the mount. For bind mounts this is the host path. + */ + @JsonProperty(value = "source") + private String source; + + /* + * Target of the mount. For bind mounts this is the path in the container. + */ + @JsonProperty(value = "target") + private String target; + + /* + * Consistency of the volume + */ + @JsonProperty(value = "consistency") + private String consistency; + + /* + * Bind Options of the mount + */ + @JsonProperty(value = "bind") + private BindOptions bind; + + /* + * Volume Options of the mount + */ + @JsonProperty(value = "volume") + private VolumeOptions volume; + + /* + * tmpfs option of the mount + */ + @JsonProperty(value = "tmpfs") + private TmpfsOptions tmpfs; + + /** + * Get the type property: Type of Volume Definition + * + *

Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + * + * @return the type value. + */ + public VolumeDefinitionType type() { + return this.type; + } + + /** + * Set the type property: Type of Volume Definition + * + *

Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + * + * @param type the type value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withType(VolumeDefinitionType type) { + this.type = type; + return this; + } + + /** + * Get the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false. + * + * @return the readOnly value. + */ + public Boolean readOnly() { + return this.readOnly; + } + + /** + * Set the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false. + * + * @param readOnly the readOnly value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + /** + * Get the source property: Source of the mount. For bind mounts this is the host path. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Source of the mount. For bind mounts this is the host path. + * + * @param source the source value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the target property: Target of the mount. For bind mounts this is the path in the container. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: Target of the mount. For bind mounts this is the path in the container. + * + * @param target the target value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the consistency property: Consistency of the volume. + * + * @return the consistency value. + */ + public String consistency() { + return this.consistency; + } + + /** + * Set the consistency property: Consistency of the volume. + * + * @param consistency the consistency value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withConsistency(String consistency) { + this.consistency = consistency; + return this; + } + + /** + * Get the bind property: Bind Options of the mount. + * + * @return the bind value. + */ + public BindOptions bind() { + return this.bind; + } + + /** + * Set the bind property: Bind Options of the mount. + * + * @param bind the bind value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withBind(BindOptions bind) { + this.bind = bind; + return this; + } + + /** + * Get the volume property: Volume Options of the mount. + * + * @return the volume value. + */ + public VolumeOptions volume() { + return this.volume; + } + + /** + * Set the volume property: Volume Options of the mount. + * + * @param volume the volume value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withVolume(VolumeOptions volume) { + this.volume = volume; + return this; + } + + /** + * Get the tmpfs property: tmpfs option of the mount. + * + * @return the tmpfs value. + */ + public TmpfsOptions tmpfs() { + return this.tmpfs; + } + + /** + * Set the tmpfs property: tmpfs option of the mount. + * + * @param tmpfs the tmpfs value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withTmpfs(TmpfsOptions tmpfs) { + this.tmpfs = tmpfs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (bind() != null) { + bind().validate(); + } + if (volume() != null) { + volume().validate(); + } + if (tmpfs() != null) { + tmpfs().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java new file mode 100644 index 0000000000000..7143029e05c6e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 VolumeDefinitionType. */ +public final class VolumeDefinitionType extends ExpandableStringEnum { + /** Static value bind for VolumeDefinitionType. */ + public static final VolumeDefinitionType BIND = fromString("bind"); + + /** Static value volume for VolumeDefinitionType. */ + public static final VolumeDefinitionType VOLUME = fromString("volume"); + + /** Static value tmpfs for VolumeDefinitionType. */ + public static final VolumeDefinitionType TMPFS = fromString("tmpfs"); + + /** Static value npipe for VolumeDefinitionType. */ + public static final VolumeDefinitionType NPIPE = fromString("npipe"); + + /** + * Creates or finds a VolumeDefinitionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeDefinitionType. + */ + @JsonCreator + public static VolumeDefinitionType fromString(String name) { + return fromString(name, VolumeDefinitionType.class); + } + + /** + * Gets known VolumeDefinitionType values. + * + * @return known VolumeDefinitionType values. + */ + public static Collection values() { + return values(VolumeDefinitionType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java new file mode 100644 index 0000000000000..69626042b9bf1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 VolumeOptions model. */ +@Fluent +public final class VolumeOptions { + /* + * Indicate whether volume is nocopy + */ + @JsonProperty(value = "nocopy") + private Boolean nocopy; + + /** + * Get the nocopy property: Indicate whether volume is nocopy. + * + * @return the nocopy value. + */ + public Boolean nocopy() { + return this.nocopy; + } + + /** + * Set the nocopy property: Indicate whether volume is nocopy. + * + * @param nocopy the nocopy value to set. + * @return the VolumeOptions object itself. + */ + public VolumeOptions withNocopy(Boolean nocopy) { + this.nocopy = nocopy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 0000000000000..28cdce17200e3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for WeekDay. */ +public final class WeekDay extends ExpandableStringEnum { + /** Static value Monday for WeekDay. */ + public static final WeekDay MONDAY = fromString("Monday"); + + /** Static value Tuesday for WeekDay. */ + public static final WeekDay TUESDAY = fromString("Tuesday"); + + /** Static value Wednesday for WeekDay. */ + public static final WeekDay WEDNESDAY = fromString("Wednesday"); + + /** Static value Thursday for WeekDay. */ + public static final WeekDay THURSDAY = fromString("Thursday"); + + /** Static value Friday for WeekDay. */ + public static final WeekDay FRIDAY = fromString("Friday"); + + /** Static value Saturday for WeekDay. */ + public static final WeekDay SATURDAY = fromString("Saturday"); + + /** Static value Sunday for WeekDay. */ + public static final WeekDay SUNDAY = fromString("Sunday"); + + /** + * Creates or finds a WeekDay from its string representation. + * + * @param name a name to look for. + * @return the corresponding WeekDay. + */ + @JsonCreator + public static WeekDay fromString(String name) { + return fromString(name, WeekDay.class); + } + + /** + * Gets known WeekDay values. + * + * @return known WeekDay values. + */ + public static Collection values() { + return values(WeekDay.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Weekday.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Weekday.java deleted file mode 100644 index fe113a65753a6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Weekday.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Weekday. */ -public final class Weekday extends ExpandableStringEnum { - /** Static value Monday for Weekday. */ - public static final Weekday MONDAY = fromString("Monday"); - - /** Static value Tuesday for Weekday. */ - public static final Weekday TUESDAY = fromString("Tuesday"); - - /** Static value Wednesday for Weekday. */ - public static final Weekday WEDNESDAY = fromString("Wednesday"); - - /** Static value Thursday for Weekday. */ - public static final Weekday THURSDAY = fromString("Thursday"); - - /** Static value Friday for Weekday. */ - public static final Weekday FRIDAY = fromString("Friday"); - - /** Static value Saturday for Weekday. */ - public static final Weekday SATURDAY = fromString("Saturday"); - - /** Static value Sunday for Weekday. */ - public static final Weekday SUNDAY = fromString("Sunday"); - - /** - * Creates or finds a Weekday from its string representation. - * - * @param name a name to look for. - * @return the corresponding Weekday. - */ - @JsonCreator - public static Weekday fromString(String name) { - return fromString(name, Weekday.class); - } - - /** - * Gets known Weekday values. - * - * @return known Weekday values. - */ - public static Collection values() { - return values(Weekday.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java index d3c6896d3395a..f06dc1006eb33 100644 --- 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 @@ -135,7 +135,7 @@ public interface Workspace { * * @return the provisioningState value. */ - ProvisioningState provisioningState(); + WorkspaceProvisioningState provisioningState(); /** * Gets the encryption property: The encryption settings of Azure ML workspace. @@ -248,6 +248,28 @@ public interface Workspace { */ 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 softDeletedAt property: The timestamp when the workspace was soft deleted. + * + * @return the softDeletedAt value. + */ + String softDeletedAt(); + + /** + * Gets the scheduledPurgeDate property: The timestamp when the soft deleted workspace is going to be purged. + * + * @return the scheduledPurgeDate value. + */ + String scheduledPurgeDate(); + /** * Gets the region of the resource. * @@ -318,7 +340,8 @@ interface WithCreate DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithSharedPrivateLinkResources, DefinitionStages.WithServiceManagedResourcesSettings, - DefinitionStages.WithPrimaryUserAssignedIdentity { + DefinitionStages.WithPrimaryUserAssignedIdentity, + DefinitionStages.WithV1LegacyMode { /** * Executes the create request. * @@ -548,6 +571,17 @@ interface WithPrimaryUserAssignedIdentity { */ 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. @@ -568,7 +602,8 @@ interface Update UpdateStages.WithPrimaryUserAssignedIdentity, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithApplicationInsights, - UpdateStages.WithContainerRegistry { + UpdateStages.WithContainerRegistry, + UpdateStages.WithEncryption { /** * Executes the update request. * @@ -700,6 +735,16 @@ interface WithContainerRegistry { */ Update withContainerRegistry(String containerRegistry); } + /** The stage of the Workspace update allowing to specify encryption. */ + interface WithEncryption { + /** + * Specifies the encryption property: The encryption settings of the workspace.. + * + * @param encryption The encryption settings of the workspace. + * @return the next definition stage. + */ + Update withEncryption(EncryptionUpdateProperties encryption); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnection.java deleted file mode 100644 index 448fa89e35a6b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnection.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; - -/** An immutable client-side representation of WorkspaceConnection. */ -public interface WorkspaceConnection { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the category property: Category of the workspace connection. - * - * @return the category value. - */ - String category(); - - /** - * Gets the target property: Target of the workspace connection. - * - * @return the target value. - */ - String target(); - - /** - * Gets the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - String authType(); - - /** - * Gets the value property: Value details of the workspace connection. - * - * @return the value value. - */ - String value(); - - /** - * Gets the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - ValueFormat valueFormat(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner object. - * - * @return the inner object. - */ - WorkspaceConnectionInner innerModel(); - - /** The entirety of the WorkspaceConnection definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The WorkspaceConnection definition stages. */ - interface DefinitionStages { - /** The first stage of the WorkspaceConnection definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the WorkspaceConnection definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the WorkspaceConnection definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithCategory, - DefinitionStages.WithTarget, - DefinitionStages.WithAuthType, - DefinitionStages.WithValue, - DefinitionStages.WithValueFormat { - /** - * Executes the create request. - * - * @return the created resource. - */ - WorkspaceConnection create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - WorkspaceConnection create(Context context); - } - /** The stage of the WorkspaceConnection definition allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Category of the workspace connection.. - * - * @param category Category of the workspace connection. - * @return the next definition stage. - */ - WithCreate withCategory(String category); - } - /** The stage of the WorkspaceConnection definition allowing to specify target. */ - interface WithTarget { - /** - * Specifies the target property: Target of the workspace connection.. - * - * @param target Target of the workspace connection. - * @return the next definition stage. - */ - WithCreate withTarget(String target); - } - /** The stage of the WorkspaceConnection definition allowing to specify authType. */ - interface WithAuthType { - /** - * Specifies the authType property: Authorization type of the workspace connection.. - * - * @param authType Authorization type of the workspace connection. - * @return the next definition stage. - */ - WithCreate withAuthType(String authType); - } - /** The stage of the WorkspaceConnection definition allowing to specify value. */ - interface WithValue { - /** - * Specifies the value property: Value details of the workspace connection.. - * - * @param value Value details of the workspace connection. - * @return the next definition stage. - */ - WithCreate withValue(String value); - } - /** The stage of the WorkspaceConnection definition allowing to specify valueFormat. */ - interface WithValueFormat { - /** - * Specifies the valueFormat property: format for the workspace connection value. - * - * @param valueFormat format for the workspace connection value. - * @return the next definition stage. - */ - WithCreate withValueFormat(ValueFormat valueFormat); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WorkspaceConnection refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WorkspaceConnection refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java new file mode 100644 index 0000000000000..e0aae15b2cefb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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 new file mode 100644 index 0000000000000..31481d31ce027 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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/fluent/models/WorkspaceConnectionProps.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java similarity index 51% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionProps.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java index 15f018b7d07cf..e7dcf650f488b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionProps.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java @@ -2,33 +2,42 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.machinelearning.fluent.models; +package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace Connection specific properties. */ +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 final class WorkspaceConnectionProps { +public class WorkspaceConnectionPropertiesV2 { /* - * Category of the workspace connection. + * Category of the connection */ @JsonProperty(value = "category") - private String category; + private ConnectionCategory category; /* - * Target of the workspace connection. + * The target property. */ @JsonProperty(value = "target") private String target; - /* - * Authorization type of the workspace connection. - */ - @JsonProperty(value = "authType") - private String authType; - /* * Value details of the workspace connection. */ @@ -42,27 +51,27 @@ public final class WorkspaceConnectionProps { private ValueFormat valueFormat; /** - * Get the category property: Category of the workspace connection. + * Get the category property: Category of the connection. * * @return the category value. */ - public String category() { + public ConnectionCategory category() { return this.category; } /** - * Set the category property: Category of the workspace connection. + * Set the category property: Category of the connection. * * @param category the category value to set. - * @return the WorkspaceConnectionProps object itself. + * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionProps withCategory(String category) { + public WorkspaceConnectionPropertiesV2 withCategory(ConnectionCategory category) { this.category = category; return this; } /** - * Get the target property: Target of the workspace connection. + * Get the target property: The target property. * * @return the target value. */ @@ -71,36 +80,16 @@ public String target() { } /** - * Set the target property: Target of the workspace connection. + * Set the target property: The target property. * * @param target the target value to set. - * @return the WorkspaceConnectionProps object itself. + * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionProps withTarget(String target) { + public WorkspaceConnectionPropertiesV2 withTarget(String target) { this.target = target; return this; } - /** - * Get the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - public String authType() { - return this.authType; - } - - /** - * Set the authType property: Authorization type of the workspace connection. - * - * @param authType the authType value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withAuthType(String authType) { - this.authType = authType; - return this; - } - /** * Get the value property: Value details of the workspace connection. * @@ -114,9 +103,9 @@ public String value() { * Set the value property: Value details of the workspace connection. * * @param value the value value to set. - * @return the WorkspaceConnectionProps object itself. + * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionProps withValue(String value) { + public WorkspaceConnectionPropertiesV2 withValue(String value) { this.value = value; return this; } @@ -134,9 +123,9 @@ public ValueFormat valueFormat() { * Set the valueFormat property: format for the workspace connection value. * * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionProps object itself. + * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionProps withValueFormat(ValueFormat valueFormat) { + public WorkspaceConnectionPropertiesV2 withValueFormat(ValueFormat valueFormat) { this.valueFormat = valueFormat; return this; } 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 new file mode 100644 index 0000000000000..22ef3cb48926e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights 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 new file mode 100644 index 0000000000000..fa1097597d03e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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; + + /** + * 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 new file mode 100644 index 0000000000000..adcacedaf727d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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 new file mode 100644 index 0000000000000..083f0fad7346e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** + * 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 index d94b5a973c353..9e7027680eb1c 100644 --- 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 @@ -11,35 +11,36 @@ /** Resource collection API of WorkspaceConnections. */ public interface WorkspaceConnections { /** - * List all connections under a AML workspace. + * 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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable list(String resourceGroupName, String workspaceName); + WorkspaceConnectionPropertiesV2BasicResource get( + String resourceGroupName, String workspaceName, String connectionName); /** - * List all connections under a AML workspace. + * 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 target Target of the workspace connection. - * @param category Category of the workspace connection. + * @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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context); + Response getWithResponse( + String resourceGroupName, String workspaceName, String connectionName, Context context); /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -47,12 +48,11 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. */ - WorkspaceConnection get(String resourceGroupName, String workspaceName, String connectionName); + void delete(String resourceGroupName, String workspaceName, String connectionName); /** - * Get the detail of a workspace connection. + * The delete operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -61,63 +61,64 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection along with {@link Response}. + * @return the {@link Response}. */ - Response getWithResponse( + Response deleteWithResponse( String resourceGroupName, String workspaceName, String connectionName, Context context); /** - * Delete a workspace connection. + * 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 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 paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String workspaceName, String connectionName); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Delete a workspace connection. + * 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 connectionName Friendly name of the workspace connection. + * @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 {@link Response}. + * @return the paginated response with {@link PagedIterable}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); + PagedIterable list( + String resourceGroupName, String workspaceName, String target, String category, Context context); /** - * Get the detail of a workspace connection. + * 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 detail of a workspace connection along with {@link Response}. + * @return the response body along with {@link Response}. */ - WorkspaceConnection getById(String id); + WorkspaceConnectionPropertiesV2BasicResource getById(String id); /** - * Get the detail of a workspace connection. + * 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 detail of a workspace connection along with {@link Response}. + * @return the response body along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Delete a workspace connection. + * The delete operation. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,7 +128,7 @@ Response deleteWithResponse( void deleteById(String id); /** - * Delete a workspace connection. + * The delete operation. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -139,10 +140,10 @@ Response deleteWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new WorkspaceConnection resource. + * Begins definition for a new WorkspaceConnectionPropertiesV2BasicResource resource. * * @param name resource name. - * @return the first stage of the new WorkspaceConnection definition. + * @return the first stage of the new WorkspaceConnectionPropertiesV2BasicResource definition. */ - WorkspaceConnection.DefinitionStages.Blank define(String name); + WorkspaceConnectionPropertiesV2BasicResource.DefinitionStages.Blank define(String name); } 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 index cfc2cce4028ca..ad3e85aa46ef4 100644 --- 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 @@ -13,16 +13,14 @@ @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. + * 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. + * The URI that can be used to request the next list of machine learning workspaces. */ @JsonProperty(value = "nextLink") private String nextLink; 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 index 19ad751b16392..d930bcac47b5b 100644 --- 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 @@ -74,7 +74,7 @@ public interface WorkspaceProperties { * * @return the provisioningState value. */ - ProvisioningState provisioningState(); + WorkspaceProvisioningState provisioningState(); /** * Gets the encryption property: The encryption settings of Azure ML workspace. @@ -187,6 +187,28 @@ public interface WorkspaceProperties { */ 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 softDeletedAt property: The timestamp when the workspace was soft deleted. + * + * @return the softDeletedAt value. + */ + String softDeletedAt(); + + /** + * Gets the scheduledPurgeDate property: The timestamp when the soft deleted workspace is going to be purged. + * + * @return the scheduledPurgeDate value. + */ + String scheduledPurgeDate(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProvisioningState.java new file mode 100644 index 0000000000000..8ebc233b95f59 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProvisioningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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 WorkspaceProvisioningState. */ +public final class WorkspaceProvisioningState extends ExpandableStringEnum { + /** Static value Unknown for WorkspaceProvisioningState. */ + public static final WorkspaceProvisioningState UNKNOWN = fromString("Unknown"); + + /** Static value Updating for WorkspaceProvisioningState. */ + public static final WorkspaceProvisioningState UPDATING = fromString("Updating"); + + /** Static value Creating for WorkspaceProvisioningState. */ + public static final WorkspaceProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for WorkspaceProvisioningState. */ + public static final WorkspaceProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for WorkspaceProvisioningState. */ + public static final WorkspaceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for WorkspaceProvisioningState. */ + public static final WorkspaceProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for WorkspaceProvisioningState. */ + public static final WorkspaceProvisioningState CANCELED = fromString("Canceled"); + + /** Static value SoftDeleted for WorkspaceProvisioningState. */ + public static final WorkspaceProvisioningState SOFT_DELETED = fromString("SoftDeleted"); + + /** + * Creates or finds a WorkspaceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkspaceProvisioningState. + */ + @JsonCreator + public static WorkspaceProvisioningState fromString(String name) { + return fromString(name, WorkspaceProvisioningState.class); + } + + /** + * Gets known WorkspaceProvisioningState values. + * + * @return known WorkspaceProvisioningState values. + */ + public static Collection values() { + return values(WorkspaceProvisioningState.class); + } +} 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 index 8687983388fca..253b22f022bf2 100644 --- 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 @@ -294,6 +294,29 @@ public WorkspaceUpdateParameters withContainerRegistry(String containerRegistry) return this; } + /** + * Get the encryption property: The encryption settings of the workspace. + * + * @return the encryption value. + */ + public EncryptionUpdateProperties encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: The encryption settings of the workspace. + * + * @param encryption the encryption value to set. + * @return the WorkspaceUpdateParameters object itself. + */ + public WorkspaceUpdateParameters withEncryption(EncryptionUpdateProperties encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParameters(); + } + this.innerProperties().withEncryption(encryption); + return this; + } + /** * Validates the instance. * 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 index eac86beb3de6d..9b13488f9ea81 100644 --- 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 @@ -6,15 +6,15 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentDetails; +import com.azure.resourcemanager.machinelearning.models.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.ResourceConfiguration; import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; @@ -26,7 +26,7 @@ /** Samples for BatchDeployments CreateOrUpdate. */ public final class BatchDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Batch Deployment. @@ -41,7 +41,7 @@ public static void createOrUpdateBatchDeployment( .withRegion("string") .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") .withProperties( - new BatchDeploymentDetails() + new BatchDeploymentProperties() .withCodeConfiguration(new CodeConfiguration().withCodeId("string").withScoringScript("string")) .withDescription("string") .withEnvironmentId("string") @@ -56,7 +56,7 @@ public static void createOrUpdateBatchDeployment( .withOutputAction(BatchOutputAction.SUMMARY_ONLY) .withOutputFileName("string") .withResources( - new ResourceConfiguration() + new DeploymentResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( 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 index 67c049a0f7340..d9556bd8d0e08 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for BatchDeployments Delete. */ public final class BatchDeploymentsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/delete.json */ /** * Sample code: Delete Batch Deployment. 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 index 52763f10899a6..d30e95a53d56f 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for BatchDeployments Get. */ public final class BatchDeploymentsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/get.json */ /** * Sample code: Get Batch Deployment. 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 index ebce2bdb39477..d676bc4cbe789 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for BatchDeployments List. */ public final class BatchDeploymentsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/list.json */ /** * Sample code: List Batch Deployment. 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 index a20abef1e2527..88907823bcd08 100644 --- 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 @@ -4,38 +4,24 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentData; -import com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel; -import com.azure.resourcemanager.machinelearning.models.BatchOutputAction; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.BatchDeployment; import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchRetrySettings; -import com.azure.resourcemanager.machinelearning.models.PartialCodeConfiguration; -import com.azure.resourcemanager.machinelearning.models.PartialIdAssetReference; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.io.IOException; -import java.time.Duration; import java.util.HashMap; import java.util.Map; /** Samples for BatchDeployments Update. */ public final class BatchDeploymentsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchDeployment/update.json */ /** * Sample code: Update Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - BatchDeploymentData resource = + public static void updateBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + BatchDeployment resource = manager .batchDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) @@ -43,41 +29,7 @@ public static void updateBatchDeployment(com.azure.resourcemanager.machinelearni resource .update() .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties( - new PartialBatchDeployment() - .withCodeConfiguration( - new PartialCodeConfiguration().withCodeId("string").withScoringScript("string")) - .withCompute("string") - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withErrorThreshold(1) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withMaxConcurrencyPerInstance(1) - .withMiniBatchSize(1L) - .withModel(new PartialIdAssetReference().withAssetId("string")) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("string") - .withProperties(mapOf("string", "string")) - .withRetrySettings( - new PartialBatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) + .withProperties(new PartialBatchDeployment().withDescription("string")) .apply(); } 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 index 349da87e66582..a91306e2e867c 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDetails; +import com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties; import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -18,7 +18,7 @@ /** Samples for BatchEndpoints CreateOrUpdate. */ public final class BatchEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Batch Endpoint. @@ -33,7 +33,7 @@ public static void createOrUpdateBatchEndpoint( .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new BatchEndpointDetails() + new BatchEndpointProperties() .withAuthMode(EndpointAuthMode.AMLTOKEN) .withDescription("string") .withProperties(mapOf("string", "string")) 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 index a8f44bb8de564..aa02d2aa70a75 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for BatchEndpoints Delete. */ public final class BatchEndpointsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/delete.json */ /** * Sample code: Delete Batch Endpoint. 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 index 19442d7d653ec..3c10970593d59 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for BatchEndpoints Get. */ public final class BatchEndpointsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/get.json */ /** * Sample code: Get Batch Endpoint. 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 index 88843178691a0..ee934a895088f 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for BatchEndpoints ListKeys. */ public final class BatchEndpointsListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/listKeys.json */ /** * Sample code: ListKeys Batch Endpoint. 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 index 98907210c6366..1d0465abe5563 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for BatchEndpoints List. */ public final class BatchEndpointsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/list.json */ /** * Sample code: List Batch Endpoint. 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 index beaf253040887..73c67c8c5e481 100644 --- 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 @@ -7,13 +7,9 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointData; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; +import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpoint; import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -21,7 +17,7 @@ /** Samples for BatchEndpoints Update. */ public final class BatchEndpointsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/BatchEndpoint/update.json */ /** * Sample code: Update Batch Endpoint. @@ -30,7 +26,7 @@ public final class BatchEndpointsUpdateSamples { */ public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - BatchEndpointData resource = + BatchEndpoint resource = manager .batchEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE) @@ -47,16 +43,6 @@ public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning SerializerFactory .createDefaultManagementSerializerAdapter() .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties( - new PartialBatchEndpoint().withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) .apply(); } 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 index f31367a571603..9540e66a78103 100644 --- 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 @@ -4,14 +4,14 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.CodeContainerDetails; +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/preview/2022-02-01-preview/examples/CodeContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Code Container. @@ -25,7 +25,7 @@ public static void createOrUpdateCodeContainer( .define("testContainer") .withExistingWorkspace("testrg123", "testworkspace") .withProperties( - new CodeContainerDetails() + new CodeContainerProperties() .withDescription("string") .withTags(mapOf("tag1", "value1", "tag2", "value2"))) .create(); 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 index 71c42219e3457..72c90ebc979a2 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for CodeContainers Delete. */ public final class CodeContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeContainer/delete.json */ /** * Sample code: Delete Code Container. 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 index 4d56a219f3b04..56dc7d7954d09 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for CodeContainers Get. */ public final class CodeContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeContainer/get.json */ /** * Sample code: Get Code Container. 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 index 69615834acacc..d5556237d7232 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for CodeContainers List. */ public final class CodeContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeContainer/list.json */ /** * Sample code: List Code Container. 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 index 1ad229f94eb90..c7b62feb2f68e 100644 --- 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 @@ -4,14 +4,14 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.CodeVersionDetails; +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/preview/2022-02-01-preview/examples/CodeVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Code Version. @@ -25,7 +25,7 @@ public static void createOrUpdateCodeVersion( .define("string") .withExistingCode("test-rg", "my-aml-workspace", "string") .withProperties( - new CodeVersionDetails() + new CodeVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) 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 index 2b63aece4d952..2bbac7c1443c0 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for CodeVersions Delete. */ public final class CodeVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeVersion/delete.json */ /** * Sample code: Delete Code Version. 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 index 67de6bacaf377..e1601837cd755 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for CodeVersions Get. */ public final class CodeVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeVersion/get.json */ /** * Sample code: Get Code Version. 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 index 79352a832f3ec..6bc07ad6e598c 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for CodeVersions List. */ public final class CodeVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/CodeVersion/list.json */ /** * Sample code: List Code Version. 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 index 98a987107b8ee..1b6a3240639a1 100644 --- 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 @@ -4,14 +4,14 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerDetails; +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/preview/2022-02-01-preview/examples/ComponentContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Component Container. @@ -25,7 +25,7 @@ public static void createOrUpdateComponentContainer( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new ComponentContainerDetails() + new ComponentContainerProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string"))) 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 index 1c013acc405a9..af9d5e531aecc 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ComponentContainers Delete. */ public final class ComponentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentContainer/delete.json */ /** * Sample code: Delete Component Container. 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 index 263dcdff41a98..09e95265f2281 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ComponentContainers Get. */ public final class ComponentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentContainer/get.json */ /** * Sample code: Get Component Container. 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 index 7178143bf2dd0..8d38008c817bc 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ComponentContainers List. */ public final class ComponentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentContainer/list.json */ /** * Sample code: List Component Container. 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 index 9a68d798b013f..345385b3ea087 100644 --- 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 @@ -6,7 +6,7 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionDetails; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -14,7 +14,7 @@ /** Samples for ComponentVersions CreateOrUpdate. */ public final class ComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Component Version. @@ -28,7 +28,7 @@ public static void createOrUpdateComponentVersion( .define("string") .withExistingComponent("test-rg", "my-aml-workspace", "string") .withProperties( - new ComponentVersionDetails() + new ComponentVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) 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 index fc97506a5b550..00fde47246b46 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ComponentVersions Delete. */ public final class ComponentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentVersion/delete.json */ /** * Sample code: Delete Component Version. 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 index bc8884e516491..10d3d2d6e8a79 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ComponentVersions Get. */ public final class ComponentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentVersion/get.json */ /** * Sample code: Get Component Version. 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 index 24bfff55e2862..2cc0410e74b8e 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ComponentVersions List. */ public final class ComponentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ComponentVersion/list.json */ /** * Sample code: List Component Version. 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 index 10e44a1114e6d..e1085067b64cc 100644 --- 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 @@ -14,27 +14,38 @@ 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.CustomService; import com.azure.resourcemanager.machinelearning.models.DataFactory; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; import com.azure.resourcemanager.machinelearning.models.Kubernetes; import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; import com.azure.resourcemanager.machinelearning.models.OsType; import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; +import com.azure.resourcemanager.machinelearning.models.Protocol; import com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess; import com.azure.resourcemanager.machinelearning.models.ResourceId; import com.azure.resourcemanager.machinelearning.models.ScaleSettings; import com.azure.resourcemanager.machinelearning.models.SshPublicAccess; import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; import com.azure.resourcemanager.machinelearning.models.VmPriority; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; import java.time.Duration; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Compute CreateOrUpdate. */ public final class ComputeCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. @@ -52,7 +63,7 @@ public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning. } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/AKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. @@ -75,7 +86,7 @@ public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning. } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -112,7 +123,7 @@ public static void attachAKubernetesCompute( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -148,7 +159,7 @@ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.M } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -171,6 +182,42 @@ public static void createAnComputeInstanceCompute( .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) .withSshSettings( new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) + .withCustomServices( + Arrays + .asList( + new CustomService() + .withName("rstudio-workbench") + .withImage( + new Image() + .withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rstudio-workbench:latest") + .withAdditionalProperties(mapOf())) + .withEnvironmentVariables( + mapOf( + "RSP_LICENSE", + new EnvironmentVariable() + .withType(EnvironmentVariableType.LOCAL) + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") + .withAdditionalProperties(mapOf()))) + .withDocker( + new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints( + Arrays + .asList( + new Endpoint() + .withProtocol(Protocol.HTTP) + .withName("connect") + .withTarget(8787) + .withPublished(4444))) + .withVolumes( + Arrays + .asList( + new VolumeDefinition() + .withType(VolumeDefinitionType.BIND) + .withReadOnly(true) + .withSource("/mnt/azureuser/") + .withTarget("/home/testuser/"))) + .withAdditionalProperties(mapOf()))) .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) .withPersonalComputeInstanceSettings( new PersonalComputeInstanceSettings() @@ -182,7 +229,7 @@ public static void createAnComputeInstanceCompute( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -202,7 +249,7 @@ public static void createAnComputeInstanceComputeWithMinimalInputs( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/AmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -229,7 +276,7 @@ public static void updateAAMLCompute(com.azure.resourcemanager.machinelearning.M } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. 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 index 946a49b311631..3dfb33ec6c403 100644 --- 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 @@ -10,7 +10,7 @@ /** Samples for Compute Delete. */ public final class ComputeDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/delete.json */ /** * Sample code: Delete Compute. 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 index 315fc0b9667eb..f04d7fae7c386 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Compute Get. */ public final class ComputeGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/get/AKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -21,7 +21,7 @@ public static void getAAKSCompute(com.azure.resourcemanager.machinelearning.Mach } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/get/KubernetesCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. @@ -33,7 +33,7 @@ public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearni } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/get/ComputeInstance.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. @@ -45,7 +45,7 @@ public static void getAnComputeInstance(com.azure.resourcemanager.machinelearnin } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/get/AmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. 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 index 47910d43d61d1..9313ea16b4b1e 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Compute ListKeys. */ public final class ComputeListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. 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 index c0804e8830f87..716e7fe9c2911 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Compute ListNodes. */ public final class ComputeListNodesSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/listNodes.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. 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 index e934364e53614..c8095412ab7c2 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Compute List. */ public final class ComputeListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/list.json */ /** * Sample code: Get Computes. 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 index 24446e5c0afe0..d7147c88a3ee6 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Compute Restart. */ public final class ComputeRestartSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/restart.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. 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 index 4dffc86033dd5..0ffb5fe9ed008 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Compute Start. */ public final class ComputeStartSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/start.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. 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 index 97a2961ce90de..dbc0152ee8e7b 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Compute Stop. */ public final class ComputeStopSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/stop.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java new file mode 100644 index 0000000000000..ac454292b77a8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; +import com.azure.resourcemanager.machinelearning.models.Protocol; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Compute UpdateCustomServices. */ +public final class ComputeUpdateCustomServicesSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/updateCustomServices.json + */ + /** + * Sample code: Update Custom Services. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateCustomServices(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .computes() + .updateCustomServicesWithResponse( + "testrg123", + "workspaces123", + "compute123", + Arrays + .asList( + new CustomService() + .withName("rstudio-workbench") + .withImage( + new Image() + .withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rstudio-workbench:latest") + .withAdditionalProperties(mapOf())) + .withEnvironmentVariables( + mapOf( + "RSP_LICENSE", + new EnvironmentVariable() + .withType(EnvironmentVariableType.LOCAL) + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") + .withAdditionalProperties(mapOf()))) + .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints( + Arrays + .asList( + new Endpoint() + .withProtocol(Protocol.HTTP) + .withName("connect") + .withTarget(8787) + .withPublished(4444))) + .withVolumes( + Arrays + .asList( + new VolumeDefinition() + .withType(VolumeDefinitionType.BIND) + .withReadOnly(true) + .withSource("/mnt/azureuser/") + .withTarget("/home/testuser/"))) + .withAdditionalProperties(mapOf())), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java new file mode 100644 index 0000000000000..13fa3b88bf708 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; + +/** Samples for Compute UpdateIdleShutdownSetting. */ +public final class ComputeUpdateIdleShutdownSettingSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/updateIdleShutdownSetting.json + */ + /** + * Sample code: Update idle shutdown setting of ComputeInstance. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateIdleShutdownSettingOfComputeInstance( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .computes() + .updateIdleShutdownSettingWithResponse( + "testrg123", + "workspaces123", + "compute123", + new IdleShutdownSetting().withIdleTimeBeforeShutdown("PT120M"), + 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 index aa62d2b897405..c2d4a738072e2 100644 --- 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 @@ -13,7 +13,7 @@ /** Samples for Compute Update. */ public final class ComputeUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Compute/patch.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. 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 index 2a455cb7025e5..3b94fbf6f5593 100644 --- 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 @@ -4,7 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.DataContainerDetails; +import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; import com.azure.resourcemanager.machinelearning.models.DataType; import java.util.HashMap; import java.util.Map; @@ -12,7 +12,7 @@ /** Samples for DataContainers CreateOrUpdate. */ public final class DataContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Data Container. @@ -26,11 +26,11 @@ public static void createOrUpdateDataContainer( .define("datacontainer123") .withExistingWorkspace("testrg123", "workspace123") .withProperties( - new DataContainerDetails() + new DataContainerProperties() .withDescription("string") .withProperties(mapOf("properties1", "value1", "properties2", "value2")) .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withDataType(DataType.URI_FILE)) + .withDataType(DataType.fromString("UriFile"))) .create(); } 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 index 6677dbc8a6232..0616c75553a3c 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for DataContainers Delete. */ public final class DataContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataContainer/delete.json */ /** * Sample code: Delete Data Container. 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 index 13a752ba4e0ab..f2cfb6092e63a 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for DataContainers Get. */ public final class DataContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataContainer/get.json */ /** * Sample code: Get Data Container. 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 index 9615c1761d32f..1c36e7a7b31d5 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for DataContainers List. */ public final class DataContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataContainer/list.json */ /** * Sample code: List Data Container. 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 index b63f9f6aca9a6..e28c284436e2d 100644 --- 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 @@ -11,7 +11,7 @@ /** Samples for DataVersions CreateOrUpdate. */ public final class DataVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataVersionBase/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Data Version Base. 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 index 9a2828b9b5f23..80c172bd44e12 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for DataVersions Delete. */ public final class DataVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataVersionBase/delete.json */ /** * Sample code: Delete Data Version Base. 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 index 3ea2798ad6ee0..1cb534e8f0091 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for DataVersions Get. */ public final class DataVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataVersionBase/get.json */ /** * Sample code: Get Data Version Base. 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 index e2998d0c46a2b..392cd7477542d 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for DataVersions List. */ public final class DataVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/DataVersionBase/list.json */ /** * Sample code: List Data Version Base. 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 index d01c903545932..b3e137c5fc65c 100644 --- 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 @@ -19,7 +19,7 @@ /** Samples for Datastores CreateOrUpdate. */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). @@ -49,7 +49,7 @@ public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). @@ -82,7 +82,7 @@ public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). @@ -111,7 +111,7 @@ public static void createOrUpdateDatastoreAzureBlobWAccountKey( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). 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 index 048a0689cb9ad..a63955b4769fe 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Datastores Delete. */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/delete.json */ /** * Sample code: Delete datastore. 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 index 362b7d5443840..8d1112e62d3f3 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Datastores Get. */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/get.json */ /** * Sample code: Get datastore. 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 index 6d6bfc02cfbab..f48c4bb413984 100644 --- 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 @@ -10,7 +10,7 @@ /** Samples for Datastores List. */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/list.json */ /** * Sample code: List datastores. 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 index 6c73e14c35797..9ce4e0f668e5d 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Datastores ListSecrets. */ public final class DatastoresListSecretsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Datastore/listSecrets.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. 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 index a1164dbfb388e..349e19fa762ac 100644 --- 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 @@ -4,14 +4,14 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerDetails; +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/preview/2022-02-01-preview/examples/EnvironmentContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Environment Container. @@ -25,7 +25,7 @@ public static void createOrUpdateEnvironmentContainer( .define("testEnvironment") .withExistingWorkspace("testrg123", "testworkspace") .withProperties( - new EnvironmentContainerDetails() + new EnvironmentContainerProperties() .withDescription("string") .withProperties( mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) 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 index d82d3bc9a1eb0..038a64e15dc67 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for EnvironmentContainers Delete. */ public final class EnvironmentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentContainer/delete.json */ /** * Sample code: Delete Environment Container. 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 index 234e62e20f55e..e81508a982ab3 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for EnvironmentContainers Get. */ public final class EnvironmentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentContainer/get.json */ /** * Sample code: Get Environment Container. 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 index 4d98d298ac4de..3486cba15a192 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for EnvironmentContainers List. */ public final class EnvironmentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentContainer/list.json */ /** * Sample code: List Environment Container. 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 index 895d59ee9e49d..ce601e0635558 100644 --- 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 @@ -5,7 +5,7 @@ package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionDetails; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; import com.azure.resourcemanager.machinelearning.models.Route; import java.util.HashMap; @@ -14,7 +14,7 @@ /** Samples for EnvironmentVersions CreateOrUpdate. */ public final class EnvironmentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Environment Version. @@ -28,7 +28,7 @@ public static void createOrUpdateEnvironmentVersion( .define("string") .withExistingEnvironment("test-rg", "my-aml-workspace", "string") .withProperties( - new EnvironmentVersionDetails() + new EnvironmentVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) 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 index 6b75b32b0a58e..a0ffb3f337fb6 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for EnvironmentVersions Delete. */ public final class EnvironmentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentVersion/delete.json */ /** * Sample code: Delete Environment Version. 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 index e4ef8171ec78e..cc3f53a6ba4df 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for EnvironmentVersions Get. */ public final class EnvironmentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentVersion/get.json */ /** * Sample code: Get Environment Version. 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 index 36b3677194fae..bfe35e12554a0 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for EnvironmentVersions List. */ public final class EnvironmentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/EnvironmentVersion/list.json */ /** * Sample code: List Environment Version. 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 index e6df172f25aa6..fde894d1e781d 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Jobs Cancel. */ public final class JobsCancelSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/cancel.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/cancel.json */ /** * Sample code: Cancel Job. @@ -17,6 +17,6 @@ public final class JobsCancelSamples { * @param manager Entry point to MachineLearningManager. */ public static void cancelJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().cancelWithResponse("test-rg", "my-aml-workspace", "string", Context.NONE); + manager.jobs().cancel("test-rg", "my-aml-workspace", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java index a9e4a13e060ee..2c08a438cfc6b 100644 --- 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 @@ -10,14 +10,13 @@ import com.azure.resourcemanager.machinelearning.models.AutoMLJob; import com.azure.resourcemanager.machinelearning.models.CommandJob; import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; -import com.azure.resourcemanager.machinelearning.models.CronSchedule; import com.azure.resourcemanager.machinelearning.models.Goal; import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; import com.azure.resourcemanager.machinelearning.models.ImageClassification; import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageVerticalDataSettings; +import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; import com.azure.resourcemanager.machinelearning.models.JobService; import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; @@ -26,17 +25,13 @@ import com.azure.resourcemanager.machinelearning.models.Objective; import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import com.azure.resourcemanager.machinelearning.models.ResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; import com.azure.resourcemanager.machinelearning.models.SweepJob; import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import com.azure.resourcemanager.machinelearning.models.TrainingDataSettings; import com.azure.resourcemanager.machinelearning.models.TrialComponent; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +39,7 @@ /** Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/AutoMLJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -67,13 +62,6 @@ public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelear .withExperimentName("string") .withIdentity(new AmlToken()) .withIsArchived(false) - .withSchedule( - new CronSchedule() - .withEndTime(OffsetDateTime.parse("2020-01-01T12:34:56.999Z")) - .withScheduleStatus(ScheduleStatus.DISABLED) - .withStartTime(OffsetDateTime.parse("2020-01-01T12:34:56.999Z")) - .withTimeZone("string") - .withExpression("string")) .withServices( mapOf( "string", @@ -92,7 +80,7 @@ public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelear .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) .withUri("string"))) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -106,23 +94,20 @@ public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelear 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)"))) - .withDataSettings( - new ImageVerticalDataSettings() - .withTargetColumnName("string") - .withTrainingData( - new TrainingDataSettings().withData(new MLTableJobInput().withUri("string")))) .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) .create(); } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/SweepJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -171,7 +156,7 @@ public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearn .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -187,7 +172,7 @@ public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearn } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/PipelineJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -232,7 +217,7 @@ public static void createOrUpdatePipelineJob( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/CommandJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -277,7 +262,7 @@ public static void createOrUpdateCommandJob( .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) .withUri("string"))) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( 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 index 2f4693836fa99..65ae1bcc94f59 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/delete.json */ /** * Sample code: Delete Job. 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 index 15b7b3b2ead51..79d7a8033d296 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/CommandJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/CommandJob/get.json */ /** * Sample code: Get Command Job. @@ -21,7 +21,7 @@ public static void getCommandJob(com.azure.resourcemanager.machinelearning.Machi } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/AutoMLJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/AutoMLJob/get.json */ /** * Sample code: Get AutoML Job. @@ -33,7 +33,7 @@ public static void getAutoMLJob(com.azure.resourcemanager.machinelearning.Machin } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/SweepJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/SweepJob/get.json */ /** * Sample code: Get Sweep Job. @@ -45,7 +45,7 @@ public static void getSweepJob(com.azure.resourcemanager.machinelearning.Machine } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/PipelineJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/PipelineJob/get.json */ /** * Sample code: Get Pipeline Job. 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 index e4847e10f0843..223e610e398ad 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/CommandJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/CommandJob/list.json */ /** * Sample code: List Command Job. @@ -21,7 +21,7 @@ public static void listCommandJob(com.azure.resourcemanager.machinelearning.Mach } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/PipelineJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/PipelineJob/list.json */ /** * Sample code: List Pipeline Job. @@ -33,7 +33,7 @@ public static void listPipelineJob(com.azure.resourcemanager.machinelearning.Mac } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/SweepJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/SweepJob/list.json */ /** * Sample code: List Sweep Job. @@ -45,7 +45,7 @@ public static void listSweepJob(com.azure.resourcemanager.machinelearning.Machin } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Job/AutoMLJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Job/AutoMLJob/list.json */ /** * Sample code: List AutoML Job. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..430d9f9931d96 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsCreateOrUpdateSamples.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All 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.LabelCategory; +import com.azure.resourcemanager.machinelearning.models.LabelClass; +import com.azure.resourcemanager.machinelearning.models.LabelingJobImageProperties; +import com.azure.resourcemanager.machinelearning.models.LabelingJobInstructions; +import com.azure.resourcemanager.machinelearning.models.LabelingJobProperties; +import com.azure.resourcemanager.machinelearning.models.MLAssistConfigurationEnabled; +import java.util.HashMap; +import java.util.Map; + +/** Samples for LabelingJobs CreateOrUpdate. */ +public final class LabelingJobsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateLabelingJob( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .labelingJobs() + .define("testLabelingJob") + .withExistingWorkspace("workspace-1234", "testworkspace") + .withProperties( + new LabelingJobProperties() + .withDescription("string") + .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withJobInstructions(new LabelingJobInstructions().withUri("link/to/instructions")) + .withLabelCategories( + mapOf( + "myCategory1", + new LabelCategory() + .withClasses( + mapOf( + "myLabelClass1", + new LabelClass().withDisplayName("myLabelClass1").withSubclasses(mapOf()), + "myLabelClass2", + new LabelClass().withDisplayName("myLabelClass2").withSubclasses(mapOf()))) + .withDisplayName("myCategory1Title") + .withMultiSelectEnabled(true), + "myCategory2", + new LabelCategory() + .withClasses( + mapOf( + "myLabelClass1", + new LabelClass().withDisplayName("myLabelClass1").withSubclasses(mapOf()), + "myLabelClass2", + new LabelClass().withDisplayName("myLabelClass2").withSubclasses(mapOf()))) + .withDisplayName("myCategory2Title") + .withMultiSelectEnabled(true))) + .withLabelingJobMediaProperties(new LabelingJobImageProperties()) + .withMlAssistConfiguration( + new MLAssistConfigurationEnabled() + .withInferencingComputeBinding( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute") + .withTrainingComputeBinding( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute"))) + .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/LabelingJobsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsDeleteSamples.java new file mode 100644 index 0000000000000..d99b49e4effa1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; + +/** Samples for LabelingJobs Delete. */ +public final class LabelingJobsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/delete.json + */ + /** + * Sample code: Delete Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().deleteWithResponse("workspace-1234", "testworkspace", "testLabelingJob", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsExportLabelsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsExportLabelsSamples.java new file mode 100644 index 0000000000000..e834ad5893b93 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsExportLabelsSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.models.DatasetExportSummary; + +/** Samples for LabelingJobs ExportLabels. */ +public final class LabelingJobsExportLabelsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/exportLabels.json + */ + /** + * Sample code: ExportLabels Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void exportLabelsLabelingJob( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .labelingJobs() + .exportLabels( + "workspace-1234", "testworkspace", "testLabelingJob", new DatasetExportSummary(), Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsGetSamples.java new file mode 100644 index 0000000000000..71c02913bd32f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; + +/** Samples for LabelingJobs Get. */ +public final class LabelingJobsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/get.json + */ + /** + * Sample code: Get Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .labelingJobs() + .getWithResponse("workspace-1234", "testworkspace", "testLabelingJob", true, true, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsListSamples.java new file mode 100644 index 0000000000000..db0ea5ac231ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; + +/** Samples for LabelingJobs List. */ +public final class LabelingJobsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/list.json + */ + /** + * Sample code: List Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().list("workspace-1234", "testworkspace", null, 10, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsPauseSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsPauseSamples.java new file mode 100644 index 0000000000000..9c46f2d7273ea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsPauseSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; + +/** Samples for LabelingJobs Pause. */ +public final class LabelingJobsPauseSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/pause.json + */ + /** + * Sample code: Pause Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void pauseLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().pauseWithResponse("workspace-1234", "testworkspace", "testLabelingJob", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsResumeSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsResumeSamples.java new file mode 100644 index 0000000000000..be7a0f5f936f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsResumeSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; + +/** Samples for LabelingJobs Resume. */ +public final class LabelingJobsResumeSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/LabelingJob/resume.json + */ + /** + * Sample code: Resume Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void resumeLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().resume("workspace-1234", "testworkspace", "testLabelingJob", 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 index 9e3ef93b92616..894dd82581fdc 100644 --- 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 @@ -4,14 +4,14 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.ModelContainerDetails; +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/preview/2022-02-01-preview/examples/ModelContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Model Container. @@ -25,7 +25,7 @@ public static void createOrUpdateModelContainer( .define("testContainer") .withExistingWorkspace("testrg123", "workspace123") .withProperties( - new ModelContainerDetails() + new ModelContainerProperties() .withDescription("Model container description") .withTags(mapOf("tag1", "value1", "tag2", "value2"))) .create(); 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 index cef9bf1c56c97..f1166a0005e9b 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ModelContainers Delete. */ public final class ModelContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelContainer/delete.json */ /** * Sample code: Delete Model Container. 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 index 9a468e4f8c679..6dbbc17594ef0 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ModelContainers Get. */ public final class ModelContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelContainer/get.json */ /** * Sample code: Get Model Container. 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 index 2f03b11e36326..5002f955cc187 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ModelContainers List. */ public final class ModelContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelContainer/list.json */ /** * Sample code: List Model Container. 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 index 4182de281143c..ee5b96da32d9e 100644 --- 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 @@ -5,15 +5,14 @@ package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionDetails; +import 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/preview/2022-02-01-preview/examples/ModelVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Model Version. @@ -27,13 +26,13 @@ public static void createOrUpdateModelVersion( .define("string") .withExistingModel("test-rg", "my-aml-workspace", "string") .withProperties( - new ModelVersionDetails() + new ModelVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType(ModelType.CUSTOM_MODEL) + .withModelType("CustomModel") .withModelUri("string")) .create(); } 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 index 5abcd0f8d1dba..def550f2899ef 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ModelVersions Delete. */ public final class ModelVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelVersion/delete.json */ /** * Sample code: Delete Model Version. 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 index 78aff7dce52d1..aa13e8e3da7e4 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ModelVersions Get. */ public final class ModelVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelVersion/get.json */ /** * Sample code: Get Model Version. 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 index 921cc20186a12..d935c7b62936a 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ModelVersions List. */ public final class ModelVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ModelVersion/list.json */ /** * Sample code: List Model Version. 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 index ce44ed3359165..30ae9ecb2e06e 100644 --- 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 @@ -24,7 +24,7 @@ /** Samples for OnlineDeployments CreateOrUpdate. */ public final class OnlineDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Kubernetes Online Deployment. @@ -88,7 +88,7 @@ public static void createOrUpdateKubernetesOnlineDeployment( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Managed Online Deployment. 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 index bdb98001c5bd1..490664a278f31 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for OnlineDeployments Delete. */ public final class OnlineDeploymentsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/delete.json */ /** * Sample code: Delete Online Deployment. 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 index adefe6402f012..a4839004ff6df 100644 --- 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 @@ -11,7 +11,7 @@ /** Samples for OnlineDeployments GetLogs. */ public final class OnlineDeploymentsGetLogsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/getLogs.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/getLogs.json */ /** * Sample code: Get Online Deployment Logs. 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 index 5884827c3109f..63d19c400ff33 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for OnlineDeployments Get. */ public final class OnlineDeploymentsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json */ /** * Sample code: Get Kubernetes Online Deployment. @@ -24,7 +24,7 @@ public static void getKubernetesOnlineDeployment( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json */ /** * Sample code: Get Managed Online Deployment. 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 index 8e453a170fff9..aaaaa1513e64e 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for OnlineDeployments List. */ public final class OnlineDeploymentsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/list.json */ /** * Sample code: List Online Deployments. 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 index 09e54d2564458..c0f6bb29fa696 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for OnlineDeployments ListSkus. */ public final class OnlineDeploymentsListSkusSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json */ /** * Sample code: List Managed Online Deployment Skus. @@ -24,7 +24,7 @@ public static void listManagedOnlineDeploymentSkus( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json */ /** * Sample code: List Kubernetes Online Deployment Skus. 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 index 3dff73c3bfa28..ea8b21f260cfc 100644 --- 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 @@ -4,24 +4,17 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentData; -import com.azure.resourcemanager.machinelearning.models.PartialKubernetesOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialManagedOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; import com.azure.resourcemanager.machinelearning.models.PartialSku; import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.io.IOException; import java.util.HashMap; import java.util.Map; /** Samples for OnlineDeployments Update. */ public final class OnlineDeploymentsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json */ /** * Sample code: Update Managed Online Deployment. @@ -29,8 +22,8 @@ public final class OnlineDeploymentsUpdateSamples { * @param manager Entry point to MachineLearningManager. */ public static void updateManagedOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - OnlineDeploymentData resource = + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + OnlineDeployment resource = manager .onlineDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) @@ -38,17 +31,6 @@ public static void updateManagedOnlineDeployment( resource .update() .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialManagedOnlineDeployment()) .withSku( new PartialSku() .withCapacity(1) @@ -60,7 +42,7 @@ public static void updateManagedOnlineDeployment( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json */ /** * Sample code: Update Kubernetes Online Deployment. @@ -68,8 +50,8 @@ public static void updateManagedOnlineDeployment( * @param manager Entry point to MachineLearningManager. */ public static void updateKubernetesOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - OnlineDeploymentData resource = + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + OnlineDeployment resource = manager .onlineDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) @@ -77,17 +59,6 @@ public static void updateKubernetesOnlineDeployment( resource .update() .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialKubernetesOnlineDeployment()) .withSku( new PartialSku() .withCapacity(1) 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 index 618d1d9e5d70c..4bd65c10c2cf7 100644 --- 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 @@ -7,7 +7,7 @@ import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointDetails; +import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; @@ -17,7 +17,7 @@ /** Samples for OnlineEndpoints CreateOrUpdate. */ public final class OnlineEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Online Endpoint. @@ -32,7 +32,7 @@ public static void createOrUpdateOnlineEndpoint( .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new OnlineEndpointDetails() + new OnlineEndpointProperties() .withAuthMode(EndpointAuthMode.AMLTOKEN) .withDescription("string") .withProperties(mapOf("string", "string")) 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 index c0fd01296b3bb..f2463115c03da 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for OnlineEndpoints Delete. */ public final class OnlineEndpointsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/delete.json */ /** * Sample code: Delete Online Endpoint. 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 index 8edd8ba5add5c..613d2cce113e2 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for OnlineEndpoints Get. */ public final class OnlineEndpointsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/get.json */ /** * Sample code: Get Online Endpoint. 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 index 3707e6893a62e..5a5f9cebb86e4 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for OnlineEndpoints GetToken. */ public final class OnlineEndpointsGetTokenSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/getToken.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/getToken.json */ /** * Sample code: GetToken Online Endpoint. 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 index 59d2d9bd2be78..1b66d10408f58 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for OnlineEndpoints ListKeys. */ public final class OnlineEndpointsListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/listKeys.json */ /** * Sample code: ListKeys Online Endpoint. 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 index bf76e04c91c36..6dbbb38bbf07b 100644 --- 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 @@ -11,7 +11,7 @@ /** Samples for OnlineEndpoints List. */ public final class OnlineEndpointsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/list.json */ /** * Sample code: List Online Endpoint. 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 index 1d9abdecc725c..2e5d1bb104f63 100644 --- 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 @@ -11,7 +11,7 @@ /** Samples for OnlineEndpoints RegenerateKeys. */ public final class OnlineEndpointsRegenerateKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/regenerateKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Online Endpoint. 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 index 9c28f07a0c0e2..00f0ab51c56cb 100644 --- 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 @@ -8,11 +8,8 @@ import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointData; +import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -20,7 +17,7 @@ /** Samples for OnlineEndpoints Update. */ public final class OnlineEndpointsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/OnlineEndpoint/update.json */ /** * Sample code: Update Online Endpoint. @@ -29,7 +26,7 @@ public final class OnlineEndpointsUpdateSamples { */ public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - OnlineEndpointData resource = + OnlineEndpoint resource = manager .onlineEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE) @@ -46,15 +43,6 @@ public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearnin SerializerFactory .createDefaultManagementSerializerAdapter() .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialOnlineEndpoint().withTraffic(mapOf("string", 1))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) .apply(); } 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 index 9f6e24ddf75bf..0c530c6f2b752 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/operationsList.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/operationsList.json */ /** * Sample code: OperationsList. 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 index adae22be8eefc..fb0d2d800617a 100644 --- 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 @@ -10,7 +10,7 @@ /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json */ /** * Sample code: WorkspacePutPrivateEndpointConnection. 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 index d3c1d5fb9cd7a..05cae77bb92f2 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateEndpointConnection/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateEndpointConnection/delete.json */ /** * Sample code: WorkspaceDeletePrivateEndpointConnection. 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 index ca77172dacf61..d77237656dd67 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateEndpointConnection/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateEndpointConnection/get.json */ /** * Sample code: WorkspaceGetPrivateEndpointConnection. 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 index 8a19dca8e6920..9f2a4fd5c28af 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateEndpointConnection/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. 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 index 6856fcce03df0..46bae3c13b590 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/PrivateLinkResource/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/PrivateLinkResource/list.json */ /** * Sample code: WorkspaceListPrivateLinkResources. 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 index d8b5cac81338a..720419011248b 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Quotas List. */ public final class QuotasListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Quota/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Quota/list.json */ /** * Sample code: List workspace quotas by VMFamily. 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 index 858972271aaa3..6f176086b9862 100644 --- 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 @@ -13,7 +13,7 @@ /** Samples for Quotas Update. */ public final class QuotasUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Quota/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Quota/update.json */ /** * Sample code: update quotas. 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 new file mode 100644 index 0000000000000..51ffd4d602df1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights 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/preview/2022-06-01-preview/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 new file mode 100644 index 0000000000000..46601b6a885ae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; + +/** Samples for Schedules Delete. */ +public final class SchedulesDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/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", 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 new file mode 100644 index 0000000000000..9275601ab9628 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; + +/** Samples for Schedules Get. */ +public final class SchedulesGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/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", 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 new file mode 100644 index 0000000000000..f779ffca797fd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.Context; + +/** Samples for Schedules List. */ +public final class SchedulesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/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, 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 index be1aaf51c237d..b7a258f2945a8 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Usages List. */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Usage/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Usage/list.json */ /** * Sample code: List Usages. 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 index 2419e5ae92a08..4a5f5b4dd0342 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for VirtualMachineSizes List. */ public final class VirtualMachineSizesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/VirtualMachineSize/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. 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 index 491234c7d941b..d99331ac5f341 100644 --- 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 @@ -4,10 +4,13 @@ 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/preview/2022-02-01-preview/examples/WorkspaceConnection/create.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -20,10 +23,10 @@ public static void createWorkspaceConnection( .workspaceConnections() .define("connection-1") .withExistingWorkspace("resourceGroup-1", "workspace-1") - .withCategory("ACR") - .withTarget("www.facebook.com") - .withAuthType("PAT") - .withValue("secrets") + .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 index 87562608439c2..e87eeae5ef11e 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for WorkspaceConnections Delete. */ public final class WorkspaceConnectionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/WorkspaceConnection/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. 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 index 53c250dcd90bc..8ecb9d695c1ad 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for WorkspaceConnections Get. */ public final class WorkspaceConnectionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/WorkspaceConnection/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. 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 index 6277f375754f3..6c738226ae162 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for WorkspaceConnections List. */ public final class WorkspaceConnectionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/WorkspaceConnection/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. @@ -18,6 +18,8 @@ public final class WorkspaceConnectionsListSamples { */ public static void listWorkspaceConnections( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceConnections().list("resourceGroup-1", "workspace-1", "www.facebook.com", "ACR", Context.NONE); + manager + .workspaceConnections() + .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", 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 index cb6c47bf13dd0..90ea34fe62937 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for WorkspaceFeatures List. */ public final class WorkspaceFeaturesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/WorkspaceFeature/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. 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 index b4e2b9f950d4f..3c201d44492ff 100644 --- 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 @@ -20,7 +20,7 @@ /** Samples for Workspaces CreateOrUpdate. */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/create.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/create.json */ /** * Sample code: Create Workspace. 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 index 1aef475b3992a..fca578e29f0b9 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. 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 index 5b33bfb24009f..7dd5555b7a192 100644 --- 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 @@ -13,7 +13,7 @@ /** Samples for Workspaces Diagnose. */ public final class WorkspacesDiagnoseSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/diagnose.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. 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 index bb84f84805f18..6cc0f5ff03088 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/get.json */ /** * Sample code: Get Workspace. 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 index f5f83077eb3d4..9d537d6f039d5 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listByResourceGroup.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. 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 index df4927c6259aa..dd0d45b2b8194 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces ListKeys. */ public final class WorkspacesListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. 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 index 34f02920a33b1..761f25884aa08 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces ListNotebookAccessToken. */ public final class WorkspacesListNotebookAccessTokenSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listNotebookAccessToken.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. 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 index 5ab643e5d4d7b..d0dbc334c2f7a 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces ListNotebookKeys. */ public final class WorkspacesListNotebookKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Notebook/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. 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 index 72632cc487547..8f8f632de7644 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. */ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ExternalFQDN/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. 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 index e6fcdfa952b8f..355cfdeb88485 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listBySubscription.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. 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 index c9800f875ebe0..a520d1da3894c 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces ListStorageAccountKeys. */ public final class WorkspacesListStorageAccountKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/listStorageAccountKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. 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 index 64f0f16a6cbbb..6cd7788590552 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces PrepareNotebook. */ public final class WorkspacesPrepareNotebookSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Notebook/prepare.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. 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 index 4871b9e5f7099..e6a89b93366ad 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces ResyncKeys. */ public final class WorkspacesResyncKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/resyncKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. 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 index 3cffa00b21bc9..297aec0d8a366 100644 --- 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 @@ -11,7 +11,7 @@ /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/Workspace/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-06-01-preview/examples/Workspace/update.json */ /** * Sample code: Update Workspace.