diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md index f4d8ab12ac0c..9d17664090dc 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-09-23) + +- 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-10. 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 1c3706cbd2c4..4bc8413faaad 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-10. 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 b28a237d2e91..25b495bf7791 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,78 @@ - [List](#quotas_list) - [Update](#quotas_update) +## Registries + +- [CreateOrUpdate](#registries_createorupdate) +- [Delete](#registries_delete) +- [GetByResourceGroup](#registries_getbyresourcegroup) +- [List](#registries_list) +- [ListByResourceGroup](#registries_listbyresourcegroup) +- [Update](#registries_update) + +## RegistryCodeContainers + +- [CreateOrUpdate](#registrycodecontainers_createorupdate) +- [Delete](#registrycodecontainers_delete) +- [Get](#registrycodecontainers_get) +- [List](#registrycodecontainers_list) + +## RegistryCodeVersions + +- [CreateOrUpdate](#registrycodeversions_createorupdate) +- [Delete](#registrycodeversions_delete) +- [Get](#registrycodeversions_get) +- [List](#registrycodeversions_list) + +## RegistryComponentContainers + +- [CreateOrUpdate](#registrycomponentcontainers_createorupdate) +- [Delete](#registrycomponentcontainers_delete) +- [Get](#registrycomponentcontainers_get) +- [List](#registrycomponentcontainers_list) + +## RegistryComponentVersions + +- [CreateOrUpdate](#registrycomponentversions_createorupdate) +- [Delete](#registrycomponentversions_delete) +- [Get](#registrycomponentversions_get) +- [List](#registrycomponentversions_list) + +## RegistryEnvironmentContainers + +- [CreateOrUpdate](#registryenvironmentcontainers_createorupdate) +- [Delete](#registryenvironmentcontainers_delete) +- [Get](#registryenvironmentcontainers_get) +- [List](#registryenvironmentcontainers_list) + +## RegistryEnvironmentVersions + +- [CreateOrUpdate](#registryenvironmentversions_createorupdate) +- [Delete](#registryenvironmentversions_delete) +- [Get](#registryenvironmentversions_get) +- [List](#registryenvironmentversions_list) + +## RegistryModelContainers + +- [CreateOrUpdate](#registrymodelcontainers_createorupdate) +- [Delete](#registrymodelcontainers_delete) +- [Get](#registrymodelcontainers_get) +- [List](#registrymodelcontainers_list) + +## RegistryModelVersions + +- [CreateOrUpdate](#registrymodelversions_createorupdate) +- [Delete](#registrymodelversions_delete) +- [Get](#registrymodelversions_get) +- [List](#registrymodelversions_list) + +## Schedules + +- [CreateOrUpdate](#schedules_createorupdate) +- [Delete](#schedules_delete) +- [Get](#schedules_get) +- [List](#schedules_list) + ## Usages - [List](#usages_list) @@ -198,15 +282,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,14 +302,14 @@ 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-10-01-preview/examples/Workspace/BatchDeployment/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Batch Deployment. + * Sample code: CreateOrUpdate Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateBatchDeployment( + public static void createOrUpdateWorkspaceBatchDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager .batchDeployments() @@ -233,7 +317,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 +332,7 @@ public final class BatchDeploymentsCreateOrUpdateSamples { .withOutputAction(BatchOutputAction.SUMMARY_ONLY) .withOutputFileName("string") .withResources( - new ResourceConfiguration() + new DeploymentResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -298,14 +382,15 @@ 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-10-01-preview/examples/Workspace/BatchDeployment/delete.json */ /** - * Sample code: Delete Batch Deployment. + * Sample code: Delete Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .delete("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE); @@ -321,14 +406,15 @@ 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-10-01-preview/examples/Workspace/BatchDeployment/get.json */ /** - * Sample code: Get Batch Deployment. + * Sample code: Get Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void getBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE); @@ -344,14 +430,15 @@ 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-10-01-preview/examples/Workspace/BatchDeployment/list.json */ /** - * Sample code: List Batch Deployment. + * Sample code: List Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void listBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .list("test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, Context.NONE); @@ -362,38 +449,25 @@ 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-10-01-preview/examples/Workspace/BatchDeployment/update.json */ /** - * Sample code: Update Batch Deployment. + * Sample code: Update Workspace 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 updateWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + BatchDeployment resource = manager .batchDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) @@ -401,41 +475,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 +496,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,14 +509,14 @@ 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-10-01-preview/examples/Workspace/BatchEndpoint/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Batch Endpoint. + * Sample code: CreateOrUpdate Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateBatchEndpoint( + public static void createOrUpdateWorkspaceBatchEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() @@ -484,7 +524,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,14 +566,15 @@ 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-10-01-preview/examples/Workspace/BatchEndpoint/delete.json */ /** - * Sample code: Delete Batch Endpoint. + * Sample code: Delete Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", Context.NONE); } } @@ -547,14 +588,15 @@ 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-10-01-preview/examples/Workspace/BatchEndpoint/get.json */ /** - * Sample code: Get Batch Endpoint. + * Sample code: Get Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } } @@ -568,14 +610,15 @@ 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-10-01-preview/examples/Workspace/BatchEndpoint/list.json */ /** - * Sample code: List Batch Endpoint. + * Sample code: List Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().list("test-rg", "my-aml-workspace", 1, null, Context.NONE); } } @@ -589,14 +632,15 @@ 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-10-01-preview/examples/Workspace/BatchEndpoint/listKeys.json */ /** - * Sample code: ListKeys Batch Endpoint. + * Sample code: ListKeys Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listKeysWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } } @@ -608,13 +652,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,16 +662,16 @@ 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-10-01-preview/examples/Workspace/BatchEndpoint/update.json */ /** - * Sample code: Update Batch Endpoint. + * Sample code: Update Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - BatchEndpointData resource = + public static void updateWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + BatchEndpoint resource = manager .batchEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE) @@ -648,16 +688,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,31 +707,36 @@ public final class BatchEndpointsUpdateSamples { ### CodeContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.CodeContainerDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; +import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/CodeContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Code Container. + * Sample code: CreateOrUpdate Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCodeContainer( + public static void createOrUpdateWorkspaceCodeContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new CodeContainerDetails() - .withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "testworkspace", + "testContainer", + new CodeContainerInner() + .withProperties( + new CodeContainerProperties() + .withDescription("string") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))), + Context.NONE); } @SuppressWarnings("unchecked") @@ -725,14 +760,15 @@ 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-10-01-preview/examples/Workspace/CodeContainer/delete.json */ /** - * Sample code: Delete Code Container. + * Sample code: Delete Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeContainers().deleteWithResponse("testrg123", "testworkspace", "testContainer", Context.NONE); } } @@ -746,14 +782,15 @@ 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-10-01-preview/examples/Workspace/CodeContainer/get.json */ /** - * Sample code: Get Code Container. + * Sample code: Get Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeContainers().getWithResponse("testrg123", "testworkspace", "testContainer", Context.NONE); } } @@ -767,14 +804,15 @@ 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-10-01-preview/examples/Workspace/CodeContainer/list.json */ /** - * Sample code: List Code Container. + * Sample code: List Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeContainers().list("testrg123", "testworkspace", null, Context.NONE); } } @@ -783,34 +821,40 @@ public final class CodeContainersListSamples { ### CodeVersions_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.CodeVersionDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/CodeVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Code Version. + * Sample code: CreateOrUpdate Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCodeVersion( + public static void createOrUpdateWorkspaceCodeVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() - .define("string") - .withExistingCode("test-rg", "my-aml-workspace", "string") - .withProperties( - new CodeVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withCodeUri("https://blobStorage/folderName")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new CodeVersionInner() + .withProperties( + new CodeVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withCodeUri("https://blobStorage/folderName")), + Context.NONE); } @SuppressWarnings("unchecked") @@ -834,14 +878,15 @@ 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-10-01-preview/examples/Workspace/CodeVersion/delete.json */ /** - * Sample code: Delete Code Version. + * Sample code: Delete Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } @@ -855,14 +900,15 @@ 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-10-01-preview/examples/Workspace/CodeVersion/get.json */ /** - * Sample code: Get Code Version. + * Sample code: Get Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } @@ -876,14 +922,15 @@ 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-10-01-preview/examples/Workspace/CodeVersion/list.json */ /** - * Sample code: List Code Version. + * Sample code: List Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions().list("test-rg", "my-aml-workspace", "string", "string", 1, null, Context.NONE); } } @@ -892,32 +939,37 @@ public final class CodeVersionsListSamples { ### ComponentContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.ComponentContainerDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/ComponentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Component Container. + * Sample code: CreateOrUpdate Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateComponentContainer( + public static void createOrUpdateWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ComponentContainerDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string"))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + new ComponentContainerInner() + .withProperties( + new ComponentContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))), + Context.NONE); } @SuppressWarnings("unchecked") @@ -941,14 +993,14 @@ 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-10-01-preview/examples/Workspace/ComponentContainer/delete.json */ /** - * Sample code: Delete Component Container. + * Sample code: Delete Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteComponentContainer( + public static void deleteWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentContainers().deleteWithResponse("test-rg", "my-aml-workspace", "string", Context.NONE); } @@ -963,14 +1015,15 @@ 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-10-01-preview/examples/Workspace/ComponentContainer/get.json */ /** - * Sample code: Get Component Container. + * Sample code: Get Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentContainers().getWithResponse("test-rg", "my-aml-workspace", "string", Context.NONE); } } @@ -984,14 +1037,14 @@ 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-10-01-preview/examples/Workspace/ComponentContainer/list.json */ /** - * Sample code: List Component Container. + * Sample code: List Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentContainer( + public static void listWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentContainers().list("test-rg", "my-aml-workspace", null, null, Context.NONE); } @@ -1002,8 +1055,10 @@ public final class ComponentContainersListSamples { ```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.ComponentVersionDetails; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -1011,33 +1066,37 @@ 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-10-01-preview/examples/Workspace/ComponentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Component Version. + * Sample code: CreateOrUpdate Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateComponentVersion( + public static void createOrUpdateWorkspaceComponentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager .componentVersions() - .define("string") - .withExistingComponent("test-rg", "my-aml-workspace", "string") - .withProperties( - new ComponentVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withComponentSpec( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", - Object.class, - SerializerEncoding.JSON))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new ComponentVersionInner() + .withProperties( + new ComponentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withComponentSpec( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", + Object.class, + SerializerEncoding.JSON))), + Context.NONE); } @SuppressWarnings("unchecked") @@ -1061,14 +1120,14 @@ 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-10-01-preview/examples/Workspace/ComponentVersion/delete.json */ /** - * Sample code: Delete Component Version. + * Sample code: Delete Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteComponentVersion( + public static void deleteWorkspaceComponentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } @@ -1083,14 +1142,15 @@ 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-10-01-preview/examples/Workspace/ComponentVersion/get.json */ /** - * Sample code: Get Component Version. + * Sample code: Get Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } @@ -1104,14 +1164,15 @@ 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-10-01-preview/examples/Workspace/ComponentVersion/list.json */ /** - * Sample code: List Component Version. + * Sample code: List Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentVersions() .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, Context.NONE); @@ -1130,29 +1191,42 @@ import com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy import com.azure.resourcemanager.machinelearning.models.AssignedUser; import com.azure.resourcemanager.machinelearning.models.ComputeInstance; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings; 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.MlflowAutologger; 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-10-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. @@ -1170,7 +1244,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-10-01-preview/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. @@ -1193,7 +1267,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-10-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -1230,7 +1304,40 @@ 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-10-01-preview/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + */ + /** + * Sample code: Create an ComputeInstance Compute with Schedules. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createAnComputeInstanceComputeWithSchedules( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .computes() + .define("compute123") + .withExistingWorkspace("testrg123", "workspaces123") + .withRegion("eastus") + .withProperties( + new ComputeInstance() + .withProperties( + new ComputeInstanceProperties() + .withVmSize("STANDARD_NC6") + .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) + .withSshSettings( + new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) + .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) + .withPersonalComputeInstanceSettings( + new PersonalComputeInstanceSettings() + .withAssignedUser( + new AssignedUser() + .withObjectId("00000000-0000-0000-0000-000000000000") + .withTenantId("00000000-0000-0000-0000-000000000000"))))) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -1266,7 +1373,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-10-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -1287,8 +1394,46 @@ public final class ComputeCreateOrUpdateSamples { .withVmSize("STANDARD_NC6") .withSubnet(new ResourceId().withId("test-subnet-resource-id")) .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) + .withAutologgerSettings( + new ComputeInstanceAutologgerSettings().withMlflowAutologger(MlflowAutologger.ENABLED)) .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 +1445,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-10-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -1320,7 +1465,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-10-01-preview/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -1347,7 +1492,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-10-01-preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. @@ -1387,7 +1532,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-10-01-preview/examples/Compute/delete.json */ /** * Sample code: Delete Compute. @@ -1410,7 +1555,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-10-01-preview/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -1422,7 +1567,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-10-01-preview/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. @@ -1434,7 +1579,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-10-01-preview/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. @@ -1446,7 +1591,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-10-01-preview/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. @@ -1467,7 +1612,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-10-01-preview/examples/Compute/list.json */ /** * Sample code: Get Computes. @@ -1488,7 +1633,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-10-01-preview/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. @@ -1509,7 +1654,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-10-01-preview/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. @@ -1531,7 +1676,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-10-01-preview/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. @@ -1553,7 +1698,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-10-01-preview/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. @@ -1575,7 +1720,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-10-01-preview/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. @@ -1601,7 +1746,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-10-01-preview/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. @@ -1626,10 +1771,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-10-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-10-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,25 +1897,25 @@ 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-10-01-preview/examples/Workspace/DataContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Data Container. + * Sample code: CreateOrUpdate Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDataContainer( + public static void createOrUpdateWorkspaceDataContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataContainers() .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,14 +1940,15 @@ 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-10-01-preview/examples/Workspace/DataContainer/delete.json */ /** - * Sample code: Delete Data Container. + * Sample code: Delete Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataContainers().deleteWithResponse("testrg123", "workspace123", "datacontainer123", Context.NONE); } } @@ -1701,14 +1962,15 @@ 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-10-01-preview/examples/Workspace/DataContainer/get.json */ /** - * Sample code: Get Data Container. + * Sample code: Get Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataContainers().getWithResponse("testrg123", "workspace123", "datacontainer123", Context.NONE); } } @@ -1722,14 +1984,15 @@ 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-10-01-preview/examples/Workspace/DataContainer/list.json */ /** - * Sample code: List Data Container. + * Sample code: List Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataContainers().list("testrg123", "workspace123", null, null, Context.NONE); } } @@ -1745,14 +2008,14 @@ 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-10-01-preview/examples/Workspace/DataVersionBase/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Data Version Base. + * Sample code: CreateOrUpdate Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDataVersionBase( + public static void createOrUpdateWorkspaceDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() @@ -1789,14 +2052,15 @@ 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-10-01-preview/examples/Workspace/DataVersionBase/delete.json */ /** - * Sample code: Delete Data Version Base. + * Sample code: Delete Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } @@ -1810,14 +2074,15 @@ 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-10-01-preview/examples/Workspace/DataVersionBase/get.json */ /** - * Sample code: Get Data Version Base. + * Sample code: Get Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void getDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } @@ -1831,14 +2096,15 @@ 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-10-01-preview/examples/Workspace/DataVersionBase/list.json */ /** - * Sample code: List Data Version Base. + * Sample code: List Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void listDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() .list("test-rg", "my-aml-workspace", "string", "string", 1, null, "string", null, Context.NONE); @@ -1864,7 +2130,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-10-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). @@ -1894,7 +2160,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-10-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). @@ -1927,7 +2193,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-10-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). @@ -1956,7 +2222,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-10-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). @@ -2005,7 +2271,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-10-01-preview/examples/Datastore/delete.json */ /** * Sample code: Delete datastore. @@ -2026,7 +2292,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-10-01-preview/examples/Datastore/get.json */ /** * Sample code: Get datastore. @@ -2048,7 +2314,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-10-01-preview/examples/Datastore/list.json */ /** * Sample code: List datastores. @@ -2081,7 +2347,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-10-01-preview/examples/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. @@ -2097,34 +2363,51 @@ public final class DatastoresListSecretsSamples { ### EnvironmentContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/EnvironmentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Environment Container. + * Sample code: CreateOrUpdate Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentContainer( + public static void createOrUpdateWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new EnvironmentContainerDetails() - .withDescription("string") + .createOrUpdateWithResponse( + "testrg123", + "testworkspace", + "testEnvironment", + new EnvironmentContainerInner() .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); + new EnvironmentContainerProperties() + .withDescription("string") + .withProperties( + mapOf( + "additionalProp1", + "string", + "additionalProp2", + "string", + "additionalProp3", + "string")) + .withTags( + mapOf( + "additionalProp1", + "string", + "additionalProp2", + "string", + "additionalProp3", + "string"))), + Context.NONE); } @SuppressWarnings("unchecked") @@ -2148,14 +2431,14 @@ 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-10-01-preview/examples/Workspace/EnvironmentContainer/delete.json */ /** - * Sample code: Delete Environment Container. + * Sample code: Delete Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentContainer( + public static void deleteWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentContainers().deleteWithResponse("testrg123", "testworkspace", "testContainer", Context.NONE); } @@ -2170,14 +2453,14 @@ 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-10-01-preview/examples/Workspace/EnvironmentContainer/get.json */ /** - * Sample code: Get Environment Container. + * Sample code: Get Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentContainer( + public static void getWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentContainers().getWithResponse("testrg123", "testworkspace", "testEnvironment", Context.NONE); } @@ -2192,14 +2475,14 @@ 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-10-01-preview/examples/Workspace/EnvironmentContainer/list.json */ /** - * Sample code: List Environment Container. + * Sample code: List Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentContainer( + public static void listWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentContainers().list("testrg123", "testworkspace", null, null, Context.NONE); } @@ -2209,8 +2492,10 @@ public final class EnvironmentContainersListSamples { ### EnvironmentVersions_CreateOrUpdate ```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; 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,38 +2504,42 @@ 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-10-01-preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Environment Version. + * Sample code: CreateOrUpdate Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentVersion( + public static void createOrUpdateWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() - .define("string") - .withExistingEnvironment("test-rg", "my-aml-workspace", "string") - .withProperties( - new EnvironmentVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withBuild( - new BuildContext() - .withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withCondaFile("string") - .withImage("docker.io/tensorflow/serving:latest") - .withInferenceConfig( - new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("string").withPort(1)) - .withReadinessRoute(new Route().withPath("string").withPort(1)) - .withScoringRoute(new Route().withPath("string").withPort(1)))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new EnvironmentVersionInner() + .withProperties( + new EnvironmentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild( + new BuildContext() + .withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))), + Context.NONE); } @SuppressWarnings("unchecked") @@ -2274,14 +2563,14 @@ 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-10-01-preview/examples/Workspace/EnvironmentVersion/delete.json */ /** - * Sample code: Delete Environment Version. + * Sample code: Delete Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentVersion( + public static void deleteWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() @@ -2298,14 +2587,15 @@ 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-10-01-preview/examples/Workspace/EnvironmentVersion/get.json */ /** - * Sample code: Get Environment Version. + * Sample code: Get Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } @@ -2319,14 +2609,14 @@ 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-10-01-preview/examples/Workspace/EnvironmentVersion/list.json */ /** - * Sample code: List Environment Version. + * Sample code: List Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentVersion( + public static void listWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() @@ -2343,7 +2633,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-10-01-preview/examples/Job/cancel.json */ /** * Sample code: Cancel Job. @@ -2351,7 +2641,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); } } ``` @@ -2363,35 +2653,32 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.machinelearning.models.AmlToken; import com.azure.resourcemanager.machinelearning.models.AutoMLJob; +import com.azure.resourcemanager.machinelearning.models.AutologgerSettings; 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.MLFlowAutologgerState; import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; import com.azure.resourcemanager.machinelearning.models.Mpi; import com.azure.resourcemanager.machinelearning.models.Objective; import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import com.azure.resourcemanager.machinelearning.models.ResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; import com.azure.resourcemanager.machinelearning.models.SweepJob; import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import com.azure.resourcemanager.machinelearning.models.TrainingDataSettings; import com.azure.resourcemanager.machinelearning.models.TrialComponent; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2399,7 +2686,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-10-01-preview/examples/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -2422,13 +2709,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 +2727,7 @@ public final class JobsCreateOrUpdateSamples { .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) .withUri("string"))) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -2461,23 +2741,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-10-01-preview/examples/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -2526,7 +2803,7 @@ public final class JobsCreateOrUpdateSamples { .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -2542,7 +2819,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-10-01-preview/examples/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -2587,7 +2864,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-10-01-preview/examples/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -2617,6 +2894,8 @@ public final class JobsCreateOrUpdateSamples { .withJobServiceType("string") .withPort(1) .withProperties(mapOf("string", "string")))) + .withAutologgerSettings( + new AutologgerSettings().withMlflowAutologger(MLFlowAutologgerState.ENABLED)) .withCodeId("string") .withCommand("string") .withDistribution(new TensorFlow().withParameterServerCount(1).withWorkerCount(1)) @@ -2632,7 +2911,7 @@ public final class JobsCreateOrUpdateSamples { .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) .withUri("string"))) .withResources( - new ResourceConfiguration() + new JobResourceConfiguration() .withInstanceCount(1) .withInstanceType("string") .withProperties( @@ -2668,7 +2947,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-10-01-preview/examples/Job/delete.json */ /** * Sample code: Delete Job. @@ -2689,7 +2968,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-10-01-preview/examples/Job/CommandJob/get.json */ /** * Sample code: Get Command Job. @@ -2701,7 +2980,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-10-01-preview/examples/Job/AutoMLJob/get.json */ /** * Sample code: Get AutoML Job. @@ -2713,7 +2992,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-10-01-preview/examples/Job/SweepJob/get.json */ /** * Sample code: Get Sweep Job. @@ -2725,7 +3004,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-10-01-preview/examples/Job/PipelineJob/get.json */ /** * Sample code: Get Pipeline Job. @@ -2746,7 +3025,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-10-01-preview/examples/Job/CommandJob/list.json */ /** * Sample code: List Command Job. @@ -2758,7 +3037,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-10-01-preview/examples/Job/PipelineJob/list.json */ /** * Sample code: List Pipeline Job. @@ -2770,7 +3049,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-10-01-preview/examples/Job/SweepJob/list.json */ /** * Sample code: List Sweep Job. @@ -2782,7 +3061,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-10-01-preview/examples/Job/AutoMLJob/list.json */ /** * Sample code: List AutoML Job. @@ -2795,34 +3074,253 @@ 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-10-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-10-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-10-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-10-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-10-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-10-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-10-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.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/ModelContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Container. + * Sample code: CreateOrUpdate Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelContainer( + public static void createOrUpdateWorkspaceModelContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties( - new ModelContainerDetails() - .withDescription("Model container description") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "workspace123", + "testContainer", + new ModelContainerInner() + .withProperties( + new ModelContainerProperties() + .withDescription("Model container description") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))), + Context.NONE); } @SuppressWarnings("unchecked") @@ -2846,14 +3344,15 @@ 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-10-01-preview/examples/Workspace/ModelContainer/delete.json */ /** - * Sample code: Delete Model Container. + * Sample code: Delete Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelContainers().deleteWithResponse("testrg123", "workspace123", "testContainer", Context.NONE); } } @@ -2867,14 +3366,15 @@ 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-10-01-preview/examples/Workspace/ModelContainer/get.json */ /** - * Sample code: Get Model Container. + * Sample code: Get Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelContainers().getWithResponse("testrg123", "workspace123", "testContainer", Context.NONE); } } @@ -2888,14 +3388,15 @@ 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-10-01-preview/examples/Workspace/ModelContainer/list.json */ /** - * Sample code: List Model Container. + * Sample code: List Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelContainers().list("testrg123", "workspace123", null, null, null, Context.NONE); } } @@ -2904,38 +3405,43 @@ public final class ModelContainersListSamples { ### ModelVersions_CreateOrUpdate ```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; 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-10-01-preview/examples/Workspace/ModelVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Version. + * Sample code: CreateOrUpdate Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelVersion( + public static void createOrUpdateWorkspaceModelVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelVersions() - .define("string") - .withExistingModel("test-rg", "my-aml-workspace", "string") - .withProperties( - new ModelVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType(ModelType.CUSTOM_MODEL) - .withModelUri("string")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new ModelVersionInner() + .withProperties( + new ModelVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) + .withModelType("CustomModel") + .withModelUri("string")), + Context.NONE); } @SuppressWarnings("unchecked") @@ -2959,14 +3465,15 @@ 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-10-01-preview/examples/Workspace/ModelVersion/delete.json */ /** - * Sample code: Delete Model Version. + * Sample code: Delete Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } @@ -2980,14 +3487,15 @@ 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-10-01-preview/examples/Workspace/ModelVersion/get.json */ /** - * Sample code: Get Model Version. + * Sample code: Get Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } @@ -3001,14 +3509,15 @@ 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-10-01-preview/examples/Workspace/ModelVersion/list.json */ /** - * Sample code: List Model Version. + * Sample code: List Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelVersions() .list( @@ -3053,7 +3562,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-10-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Kubernetes Online Deployment. @@ -3117,7 +3626,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-10-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Managed Online Deployment. @@ -3199,14 +3708,14 @@ 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-10-01-preview/examples/Workspace/OnlineDeployment/delete.json */ /** - * Sample code: Delete Online Deployment. + * Sample code: Delete Workspace Online Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineDeployment( + public static void deleteWorkspaceOnlineDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineDeployments().delete("testrg123", "workspace123", "testEndpoint", "testDeployment", Context.NONE); } @@ -3221,7 +3730,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-10-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json */ /** * Sample code: Get Kubernetes Online Deployment. @@ -3236,7 +3745,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-10-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json */ /** * Sample code: Get Managed Online Deployment. @@ -3262,7 +3771,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-10-01-preview/examples/OnlineDeployment/getLogs.json */ /** * Sample code: Get Online Deployment Logs. @@ -3292,7 +3801,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-10-01-preview/examples/OnlineDeployment/list.json */ /** * Sample code: List Online Deployments. @@ -3315,7 +3824,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-10-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json */ /** * Sample code: List Managed Online Deployment Skus. @@ -3330,7 +3839,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-10-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json */ /** * Sample code: List Kubernetes Online Deployment Skus. @@ -3349,24 +3858,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-10-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json */ /** * Sample code: Update Managed Online Deployment. @@ -3374,8 +3876,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 +3885,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 +3896,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-10-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json */ /** * Sample code: Update Kubernetes Online Deployment. @@ -3413,8 +3904,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 +3913,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 +3942,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,14 +3952,14 @@ 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-10-01-preview/examples/Workspace/OnlineEndpoint/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Online Endpoint. + * Sample code: CreateOrUpdate Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateOnlineEndpoint( + public static void createOrUpdateWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() @@ -3487,7 +3967,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,14 +4010,15 @@ 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-10-01-preview/examples/Workspace/OnlineEndpoint/delete.json */ /** - * Sample code: Delete Online Endpoint. + * Sample code: Delete Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineEndpoints().delete("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } } @@ -3551,14 +4032,15 @@ 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-10-01-preview/examples/Workspace/OnlineEndpoint/get.json */ /** - * Sample code: Get Online Endpoint. + * Sample code: Get Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineEndpoints().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } } @@ -3572,14 +4054,14 @@ 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-10-01-preview/examples/Workspace/OnlineEndpoint/getToken.json */ /** - * Sample code: GetToken Online Endpoint. + * Sample code: GetToken Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getTokenOnlineEndpoint( + public static void getTokenWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineEndpoints().getTokenWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } @@ -3596,14 +4078,15 @@ 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-10-01-preview/examples/Workspace/OnlineEndpoint/list.json */ /** - * Sample code: List Online Endpoint. + * Sample code: List Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() .list( @@ -3629,14 +4112,14 @@ 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-10-01-preview/examples/Workspace/OnlineEndpoint/listKeys.json */ /** - * Sample code: ListKeys Online Endpoint. + * Sample code: ListKeys Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysOnlineEndpoint( + public static void listKeysWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineEndpoints().listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } @@ -3653,14 +4136,14 @@ 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-10-01-preview/examples/Workspace/OnlineEndpoint/regenerateKeys.json */ /** - * Sample code: RegenerateKeys Online Endpoint. + * Sample code: RegenerateKeys Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void regenerateKeysOnlineEndpoint( + public static void regenerateKeysWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() @@ -3681,11 +4164,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,16 +4173,16 @@ 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-10-01-preview/examples/Workspace/OnlineEndpoint/update.json */ /** - * Sample code: Update Online Endpoint. + * Sample code: Update Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - OnlineEndpointData resource = + public static void updateWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + OnlineEndpoint resource = manager .onlineEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE) @@ -3719,15 +4199,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 +4223,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-10-01-preview/examples/Workspace/operationsList.json */ /** * Sample code: OperationsList. @@ -3774,7 +4245,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-10-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json */ /** * Sample code: WorkspacePutPrivateEndpointConnection. @@ -3804,7 +4275,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-10-01-preview/examples/PrivateEndpointConnection/delete.json */ /** * Sample code: WorkspaceDeletePrivateEndpointConnection. @@ -3828,7 +4299,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-10-01-preview/examples/PrivateEndpointConnection/get.json */ /** * Sample code: WorkspaceGetPrivateEndpointConnection. @@ -3852,7 +4323,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-10-01-preview/examples/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. @@ -3874,7 +4345,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-10-01-preview/examples/PrivateLinkResource/list.json */ /** * Sample code: WorkspaceListPrivateLinkResources. @@ -3896,7 +4367,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-10-01-preview/examples/Quota/list.json */ /** * Sample code: List workspace quotas by VMFamily. @@ -3922,7 +4393,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-10-01-preview/examples/Quota/update.json */ /** * Sample code: update quotas. @@ -3955,25 +4426,1465 @@ public final class QuotasUpdateSamples { } ``` -### Usages_List +### Registries_CreateOrUpdate ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.models.AcrDetails; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.RegistryProperties; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; -/** Samples for Usages List. */ -public final class UsagesListSamples { +/** Samples for Registries CreateOrUpdate. */ +public final class RegistriesCreateOrUpdateSamples { /* - * 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-10-01-preview/examples/Registries/createOrUpdate-SystemCreated.json */ /** - * Sample code: List Usages. + * Sample code: CreateOrUpdate Registry with system created accounts. * * @param manager Entry point to MachineLearningManager. */ - public static void listUsages(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.usages().list("eastus", Context.NONE); - } -} + public static void createOrUpdateRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .define("string") + .withRegion("string") + .withExistingResourceGroup("test-rg") + .withProperties( + new RegistryProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount() + .withAcrAccountSku("string") + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string")) + .withStorageAccountHnsEnabled(false) + .withStorageAccountType("string"))))))) + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.BASIC) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/createOrUpdate-UserCreated.json + */ + /** + * Sample code: CreateOrUpdate Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .define("string") + .withRegion("string") + .withExistingResourceGroup("test-rg") + .withProperties( + new RegistryProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withUserCreatedAcrAccount( + new UserCreatedAcrAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withUserCreatedStorageAccount( + new UserCreatedStorageAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string")))))))) + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.BASIC) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Registries_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Registries Delete. */ +public final class RegistriesDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/delete.json + */ + /** + * Sample code: Delete Registry. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistry(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().deleteWithResponse("test-rg", "string", Context.NONE); + } +} +``` + +### Registries_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Registries GetByResourceGroup. */ +public final class RegistriesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/get-UserCreated.json + */ + /** + * Sample code: Get Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().getByResourceGroupWithResponse("test-rg", "string", Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/get-SystemCreated.json + */ + /** + * Sample code: Get Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().getByResourceGroupWithResponse("test-rg", "string", Context.NONE); + } +} +``` + +### Registries_List + +```java +import com.azure.core.util.Context; + +/** Samples for Registries List. */ +public final class RegistriesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/listBySubscription.json + */ + /** + * Sample code: List registries. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistries(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().list(null, Context.NONE); + } +} +``` + +### Registries_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Registries ListByResourceGroup. */ +public final class RegistriesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/list-UserCreated.json + */ + /** + * Sample code: List registries with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().listByResourceGroup("test-rg", null, Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/list-SystemCreated.json + */ + /** + * Sample code: List registries with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().listByResourceGroup("test-rg", null, Context.NONE); + } +} +``` + +### Registries_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.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Registry; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries Update. */ +public final class RegistriesUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/update-UserCreated.json + */ + /** + * Sample code: Update Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + Registry resource = + manager.registries().getByResourceGroupWithResponse("test-rg", "string", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new PartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "string", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withKind("string") + .withProperties( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.PREMIUM)) + .apply(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/update-SystemCreated.json + */ + /** + * Sample code: Update Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + Registry resource = + manager.registries().getByResourceGroupWithResponse("test-rg", "string", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new PartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "string", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withKind("string") + .withProperties( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.PREMIUM)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryCodeContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryCodeContainers CreateOrUpdate. */ +public final class RegistryCodeContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeContainers() + .define("testContainer") + .withExistingRegistry("testrg123", "testregistry") + .withProperties( + new CodeContainerProperties() + .withDescription("string") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryCodeContainers_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryCodeContainers Delete. */ +public final class RegistryCodeContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeContainer/delete.json + */ + /** + * Sample code: Delete Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeContainers().delete("testrg123", "testregistry", "testContainer", Context.NONE); + } +} +``` + +### RegistryCodeContainers_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryCodeContainers Get. */ +public final class RegistryCodeContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeContainer/get.json + */ + /** + * Sample code: Get Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeContainers().getWithResponse("testrg123", "testregistry", "testContainer", Context.NONE); + } +} +``` + +### RegistryCodeContainers_List + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryCodeContainers List. */ +public final class RegistryCodeContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeContainer/list.json + */ + /** + * Sample code: List Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeContainers().list("testrg123", "testregistry", null, Context.NONE); + } +} +``` + +### RegistryCodeVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryCodeVersions CreateOrUpdate. */ +public final class RegistryCodeVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .define("string") + .withExistingCode("test-rg", "my-aml-registry", "string") + .withProperties( + new CodeVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withCodeUri("https://blobStorage/folderName")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryCodeVersions_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryCodeVersions Delete. */ +public final class RegistryCodeVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeVersion/delete.json + */ + /** + * Sample code: Delete Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeVersions().delete("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} +``` + +### RegistryCodeVersions_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryCodeVersions Get. */ +public final class RegistryCodeVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeVersion/get.json + */ + /** + * Sample code: Get Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeVersions().getWithResponse("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} +``` + +### RegistryCodeVersions_List + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryCodeVersions List. */ +public final class RegistryCodeVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeVersion/list.json + */ + /** + * Sample code: List Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeVersions().list("test-rg", "my-aml-registry", "string", "string", 1, null, Context.NONE); + } +} +``` + +### RegistryComponentContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryComponentContainers CreateOrUpdate. */ +public final class RegistryComponentContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentContainers() + .define("string") + .withExistingRegistry("test-rg", "my-aml-registry") + .withProperties( + new ComponentContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryComponentContainers_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryComponentContainers Delete. */ +public final class RegistryComponentContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentContainer/delete.json + */ + /** + * Sample code: Delete Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryComponentContainers().delete("test-rg", "my-aml-registry", "string", Context.NONE); + } +} +``` + +### RegistryComponentContainers_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryComponentContainers Get. */ +public final class RegistryComponentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentContainer/get.json + */ + /** + * Sample code: Get Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryComponentContainers().getWithResponse("test-rg", "my-aml-registry", "string", Context.NONE); + } +} +``` + +### RegistryComponentContainers_List + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryComponentContainers List. */ +public final class RegistryComponentContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentContainer/list.json + */ + /** + * Sample code: List Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryComponentContainers().list("test-rg", "my-aml-registry", null, Context.NONE); + } +} +``` + +### RegistryComponentVersions_CreateOrUpdate + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryComponentVersions CreateOrUpdate. */ +public final class RegistryComponentVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager + .registryComponentVersions() + .define("string") + .withExistingComponent("test-rg", "my-aml-registry", "string") + .withProperties( + new ComponentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withComponentSpec( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", + Object.class, + SerializerEncoding.JSON))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryComponentVersions_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryComponentVersions Delete. */ +public final class RegistryComponentVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentVersion/delete.json + */ + /** + * Sample code: Delete Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryComponentVersions().delete("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} +``` + +### RegistryComponentVersions_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryComponentVersions Get. */ +public final class RegistryComponentVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentVersion/get.json + */ + /** + * Sample code: Get Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} +``` + +### RegistryComponentVersions_List + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryComponentVersions List. */ +public final class RegistryComponentVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentVersion/list.json + */ + /** + * Sample code: List Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentVersions() + .list("test-rg", "my-aml-registry", "string", "string", 1, null, Context.NONE); + } +} +``` + +### RegistryEnvironmentContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryEnvironmentContainers CreateOrUpdate. */ +public final class RegistryEnvironmentContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .define("testEnvironment") + .withExistingRegistry("testrg123", "testregistry") + .withProperties( + new EnvironmentContainerProperties() + .withDescription("string") + .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryEnvironmentContainers_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryEnvironmentContainers Delete. */ +public final class RegistryEnvironmentContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentContainer/delete.json + */ + /** + * Sample code: Delete Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryEnvironmentContainers().delete("testrg123", "testregistry", "testContainer", Context.NONE); + } +} +``` + +### RegistryEnvironmentContainers_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryEnvironmentContainers Get. */ +public final class RegistryEnvironmentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentContainer/get.json + */ + /** + * Sample code: Get Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .getWithResponse("testrg123", "testregistry", "testEnvironment", Context.NONE); + } +} +``` + +### RegistryEnvironmentContainers_List + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryEnvironmentContainers List. */ +public final class RegistryEnvironmentContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentContainer/list.json + */ + /** + * Sample code: List Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryEnvironmentContainers().list("testrg123", "testregistry", null, null, Context.NONE); + } +} +``` + +### RegistryEnvironmentVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.BuildContext; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; +import com.azure.resourcemanager.machinelearning.models.Route; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryEnvironmentVersions CreateOrUpdate. */ +public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .define("string") + .withExistingEnvironment("test-rg", "my-aml-registry", "string") + .withProperties( + new EnvironmentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild( + new BuildContext() + .withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryEnvironmentVersions_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryEnvironmentVersions Delete. */ +public final class RegistryEnvironmentVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentVersion/delete.json + */ + /** + * Sample code: Delete Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryEnvironmentVersions().delete("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} +``` + +### RegistryEnvironmentVersions_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryEnvironmentVersions Get. */ +public final class RegistryEnvironmentVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentVersion/get.json + */ + /** + * Sample code: Get Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} +``` + +### RegistryEnvironmentVersions_List + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryEnvironmentVersions List. */ +public final class RegistryEnvironmentVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentVersion/list.json + */ + /** + * Sample code: List Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .list("test-rg", "my-aml-regsitry", "string", "string", 1, null, null, Context.NONE); + } +} +``` + +### RegistryModelContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryModelContainers CreateOrUpdate. */ +public final class RegistryModelContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelContainers() + .define("testContainer") + .withExistingRegistry("testrg123", "registry123") + .withProperties( + new ModelContainerProperties() + .withDescription("Model container description") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryModelContainers_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryModelContainers Delete. */ +public final class RegistryModelContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelContainer/delete.json + */ + /** + * Sample code: Delete Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelContainers().delete("testrg123", "registry123", "testContainer", Context.NONE); + } +} +``` + +### RegistryModelContainers_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryModelContainers Get. */ +public final class RegistryModelContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelContainer/get.json + */ + /** + * Sample code: Get Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelContainers().getWithResponse("testrg123", "registry123", "testContainer", Context.NONE); + } +} +``` + +### RegistryModelContainers_List + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryModelContainers List. */ +public final class RegistryModelContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelContainer/list.json + */ + /** + * Sample code: List Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelContainers().list("testrg123", "registry123", null, null, Context.NONE); + } +} +``` + +### RegistryModelVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.FlavorData; +import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryModelVersions CreateOrUpdate. */ +public final class RegistryModelVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .define("string") + .withExistingModel("test-rg", "my-aml-registry", "string") + .withProperties( + new ModelVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) + .withModelType("CustomModel") + .withModelUri("string")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryModelVersions_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryModelVersions Delete. */ +public final class RegistryModelVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelVersion/delete.json + */ + /** + * Sample code: Delete Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelVersions().delete("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} +``` + +### RegistryModelVersions_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryModelVersions Get. */ +public final class RegistryModelVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelVersion/get.json + */ + /** + * Sample code: Get Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelVersions().getWithResponse("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} +``` + +### RegistryModelVersions_List + +```java +import com.azure.core.util.Context; + +/** Samples for RegistryModelVersions List. */ +public final class RegistryModelVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelVersion/list.json + */ + /** + * Sample code: List Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .list( + "test-rg", + "my-aml-registry", + "string", + null, + "string", + 1, + "string", + "string", + "string", + "string", + null, + Context.NONE); + } +} +``` + +### 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-10-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-10-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-10-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-10-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, null, Context.NONE); + } +} +``` + +### Usages_List + +```java +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-10-01-preview/examples/Usage/list.json + */ + /** + * Sample code: List Usages. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listUsages(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.usages().list("eastus", Context.NONE); + } +} ``` ### VirtualMachineSizes_List @@ -3984,7 +5895,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-10-01-preview/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. @@ -4000,10 +5911,12 @@ public final class VirtualMachineSizesListSamples { ### WorkspaceConnections_Create ```java +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-10-01-preview/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -4016,10 +5929,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("ContainerRegistry") + .withTarget("www.facebook.com")) .create(); } } @@ -4033,7 +5946,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-10-01-preview/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. @@ -4057,7 +5970,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-10-01-preview/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. @@ -4079,7 +5992,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-10-01-preview/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. @@ -4088,7 +6001,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 +6016,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-10-01-preview/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. @@ -4133,7 +6048,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-10-01-preview/examples/Workspace/create.json */ /** * Sample code: Create Workspace. @@ -4212,7 +6127,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-10-01-preview/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. @@ -4237,7 +6152,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-10-01-preview/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. @@ -4286,7 +6201,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-10-01-preview/examples/Workspace/get.json */ /** * Sample code: Get Workspace. @@ -4307,7 +6222,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-10-01-preview/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. @@ -4329,7 +6244,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-10-01-preview/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. @@ -4351,7 +6266,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-10-01-preview/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -4372,7 +6287,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-10-01-preview/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. @@ -4393,7 +6308,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-10-01-preview/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -4414,7 +6329,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-10-01-preview/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. @@ -4438,7 +6353,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-10-01-preview/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. @@ -4459,7 +6374,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-10-01-preview/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. @@ -4480,7 +6395,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-10-01-preview/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. @@ -4503,7 +6418,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-10-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 82b5a13a8e13..c09de5891927 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-10. 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 763294717f94..dffbc39eed53 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 @@ -23,8 +23,8 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.AzureMachineLearningWorkspaces; -import com.azure.resourcemanager.machinelearning.implementation.AzureMachineLearningWorkspacesBuilder; +import com.azure.resourcemanager.machinelearning.fluent.AzureMachineLearningServices; +import com.azure.resourcemanager.machinelearning.implementation.AzureMachineLearningServicesBuilder; import com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsImpl; import com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsImpl; import com.azure.resourcemanager.machinelearning.implementation.CodeContainersImpl; @@ -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,16 @@ import com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.machinelearning.implementation.QuotasImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistriesImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryComponentContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryComponentVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.SchedulesImpl; import com.azure.resourcemanager.machinelearning.implementation.UsagesImpl; import com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesImpl; import com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsImpl; @@ -64,6 +75,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 +84,16 @@ import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnections; import com.azure.resourcemanager.machinelearning.models.PrivateLinkResources; import com.azure.resourcemanager.machinelearning.models.Quotas; +import com.azure.resourcemanager.machinelearning.models.Registries; +import com.azure.resourcemanager.machinelearning.models.RegistryCodeContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryCodeVersions; +import com.azure.resourcemanager.machinelearning.models.RegistryComponentContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryComponentVersions; +import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentVersions; +import com.azure.resourcemanager.machinelearning.models.RegistryModelContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryModelVersions; +import com.azure.resourcemanager.machinelearning.models.Schedules; import com.azure.resourcemanager.machinelearning.models.Usages; import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizes; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnections; @@ -107,6 +129,22 @@ public final class MachineLearningManager { private WorkspaceConnections workspaceConnections; + private RegistryCodeContainers registryCodeContainers; + + private RegistryCodeVersions registryCodeVersions; + + private RegistryComponentContainers registryComponentContainers; + + private RegistryComponentVersions registryComponentVersions; + + private RegistryEnvironmentContainers registryEnvironmentContainers; + + private RegistryEnvironmentVersions registryEnvironmentVersions; + + private RegistryModelContainers registryModelContainers; + + private RegistryModelVersions registryModelVersions; + private BatchEndpoints batchEndpoints; private BatchDeployments batchDeployments; @@ -131,6 +169,8 @@ public final class MachineLearningManager { private Jobs jobs; + private LabelingJobs labelingJobs; + private ModelContainers modelContainers; private ModelVersions modelVersions; @@ -139,15 +179,19 @@ public final class MachineLearningManager { private OnlineDeployments onlineDeployments; + private Schedules schedules; + private WorkspaceFeatures workspaceFeatures; - private final AzureMachineLearningWorkspaces clientObject; + private Registries registries; + + private final AzureMachineLearningServices clientObject; private MachineLearningManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); this.clientObject = - new AzureMachineLearningWorkspacesBuilder() + new AzureMachineLearningServicesBuilder() .pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) @@ -306,7 +350,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 +505,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 +518,109 @@ public WorkspaceConnections workspaceConnections() { } /** - * Gets the resource collection API of BatchEndpoints. It manages BatchEndpointData. + * Gets the resource collection API of RegistryCodeContainers. It manages CodeContainer. + * + * @return Resource collection API of RegistryCodeContainers. + */ + public RegistryCodeContainers registryCodeContainers() { + if (this.registryCodeContainers == null) { + this.registryCodeContainers = + new RegistryCodeContainersImpl(clientObject.getRegistryCodeContainers(), this); + } + return registryCodeContainers; + } + + /** + * Gets the resource collection API of RegistryCodeVersions. It manages CodeVersion. + * + * @return Resource collection API of RegistryCodeVersions. + */ + public RegistryCodeVersions registryCodeVersions() { + if (this.registryCodeVersions == null) { + this.registryCodeVersions = new RegistryCodeVersionsImpl(clientObject.getRegistryCodeVersions(), this); + } + return registryCodeVersions; + } + + /** + * Gets the resource collection API of RegistryComponentContainers. It manages ComponentContainer. + * + * @return Resource collection API of RegistryComponentContainers. + */ + public RegistryComponentContainers registryComponentContainers() { + if (this.registryComponentContainers == null) { + this.registryComponentContainers = + new RegistryComponentContainersImpl(clientObject.getRegistryComponentContainers(), this); + } + return registryComponentContainers; + } + + /** + * Gets the resource collection API of RegistryComponentVersions. It manages ComponentVersion. + * + * @return Resource collection API of RegistryComponentVersions. + */ + public RegistryComponentVersions registryComponentVersions() { + if (this.registryComponentVersions == null) { + this.registryComponentVersions = + new RegistryComponentVersionsImpl(clientObject.getRegistryComponentVersions(), this); + } + return registryComponentVersions; + } + + /** + * Gets the resource collection API of RegistryEnvironmentContainers. It manages EnvironmentContainer. + * + * @return Resource collection API of RegistryEnvironmentContainers. + */ + public RegistryEnvironmentContainers registryEnvironmentContainers() { + if (this.registryEnvironmentContainers == null) { + this.registryEnvironmentContainers = + new RegistryEnvironmentContainersImpl(clientObject.getRegistryEnvironmentContainers(), this); + } + return registryEnvironmentContainers; + } + + /** + * Gets the resource collection API of RegistryEnvironmentVersions. It manages EnvironmentVersion. + * + * @return Resource collection API of RegistryEnvironmentVersions. + */ + public RegistryEnvironmentVersions registryEnvironmentVersions() { + if (this.registryEnvironmentVersions == null) { + this.registryEnvironmentVersions = + new RegistryEnvironmentVersionsImpl(clientObject.getRegistryEnvironmentVersions(), this); + } + return registryEnvironmentVersions; + } + + /** + * Gets the resource collection API of RegistryModelContainers. It manages ModelContainer. + * + * @return Resource collection API of RegistryModelContainers. + */ + public RegistryModelContainers registryModelContainers() { + if (this.registryModelContainers == null) { + this.registryModelContainers = + new RegistryModelContainersImpl(clientObject.getRegistryModelContainers(), this); + } + return registryModelContainers; + } + + /** + * Gets the resource collection API of RegistryModelVersions. It manages ModelVersion. + * + * @return Resource collection API of RegistryModelVersions. + */ + public RegistryModelVersions registryModelVersions() { + if (this.registryModelVersions == null) { + this.registryModelVersions = new RegistryModelVersionsImpl(clientObject.getRegistryModelVersions(), this); + } + return registryModelVersions; + } + + /** + * Gets the resource collection API of BatchEndpoints. It manages BatchEndpoint. * * @return Resource collection API of BatchEndpoints. */ @@ -485,7 +632,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 +644,7 @@ public BatchDeployments batchDeployments() { } /** - * Gets the resource collection API of CodeContainers. It manages CodeContainerData. + * Gets the resource collection API of CodeContainers. * * @return Resource collection API of CodeContainers. */ @@ -509,7 +656,7 @@ public CodeContainers codeContainers() { } /** - * Gets the resource collection API of CodeVersions. It manages CodeVersionData. + * Gets the resource collection API of CodeVersions. * * @return Resource collection API of CodeVersions. */ @@ -521,7 +668,7 @@ public CodeVersions codeVersions() { } /** - * Gets the resource collection API of ComponentContainers. It manages ComponentContainerData. + * Gets the resource collection API of ComponentContainers. * * @return Resource collection API of ComponentContainers. */ @@ -533,7 +680,7 @@ public ComponentContainers componentContainers() { } /** - * Gets the resource collection API of ComponentVersions. It manages ComponentVersionData. + * Gets the resource collection API of ComponentVersions. * * @return Resource collection API of ComponentVersions. */ @@ -545,7 +692,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 +704,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 +716,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 +728,7 @@ public Datastores datastores() { } /** - * Gets the resource collection API of EnvironmentContainers. It manages EnvironmentContainerData. + * Gets the resource collection API of EnvironmentContainers. * * @return Resource collection API of EnvironmentContainers. */ @@ -593,7 +740,7 @@ public EnvironmentContainers environmentContainers() { } /** - * Gets the resource collection API of EnvironmentVersions. It manages EnvironmentVersionData. + * Gets the resource collection API of EnvironmentVersions. * * @return Resource collection API of EnvironmentVersions. */ @@ -605,7 +752,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 +764,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. * * @return Resource collection API of ModelContainers. */ @@ -629,7 +788,7 @@ public ModelContainers modelContainers() { } /** - * Gets the resource collection API of ModelVersions. It manages ModelVersionData. + * Gets the resource collection API of ModelVersions. * * @return Resource collection API of ModelVersions. */ @@ -641,7 +800,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 +812,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 +823,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. * @@ -677,10 +848,22 @@ public WorkspaceFeatures workspaceFeatures() { } /** - * @return Wrapped service client AzureMachineLearningWorkspaces providing direct access to the underlying + * Gets the resource collection API of Registries. It manages Registry. + * + * @return Resource collection API of Registries. + */ + public Registries registries() { + if (this.registries == null) { + this.registries = new RegistriesImpl(clientObject.getRegistries(), this); + } + return registries; + } + + /** + * @return Wrapped service client AzureMachineLearningServices providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. */ - public AzureMachineLearningWorkspaces serviceClient() { + public AzureMachineLearningServices serviceClient() { return this.clientObject; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningServices.java similarity index 70% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningServices.java index 431d49bfc7f1..f0d6d8c639fe 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/AzureMachineLearningServices.java @@ -7,8 +7,8 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for AzureMachineLearningWorkspaces class. */ -public interface AzureMachineLearningWorkspaces { +/** The interface for AzureMachineLearningServices class. */ +public interface AzureMachineLearningServices { /** * Gets The ID of the target subscription. * @@ -107,6 +107,62 @@ public interface AzureMachineLearningWorkspaces { */ WorkspaceConnectionsClient getWorkspaceConnections(); + /** + * Gets the RegistryCodeContainersClient object to access its operations. + * + * @return the RegistryCodeContainersClient object. + */ + RegistryCodeContainersClient getRegistryCodeContainers(); + + /** + * Gets the RegistryCodeVersionsClient object to access its operations. + * + * @return the RegistryCodeVersionsClient object. + */ + RegistryCodeVersionsClient getRegistryCodeVersions(); + + /** + * Gets the RegistryComponentContainersClient object to access its operations. + * + * @return the RegistryComponentContainersClient object. + */ + RegistryComponentContainersClient getRegistryComponentContainers(); + + /** + * Gets the RegistryComponentVersionsClient object to access its operations. + * + * @return the RegistryComponentVersionsClient object. + */ + RegistryComponentVersionsClient getRegistryComponentVersions(); + + /** + * Gets the RegistryEnvironmentContainersClient object to access its operations. + * + * @return the RegistryEnvironmentContainersClient object. + */ + RegistryEnvironmentContainersClient getRegistryEnvironmentContainers(); + + /** + * Gets the RegistryEnvironmentVersionsClient object to access its operations. + * + * @return the RegistryEnvironmentVersionsClient object. + */ + RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions(); + + /** + * Gets the RegistryModelContainersClient object to access its operations. + * + * @return the RegistryModelContainersClient object. + */ + RegistryModelContainersClient getRegistryModelContainers(); + + /** + * Gets the RegistryModelVersionsClient object to access its operations. + * + * @return the RegistryModelVersionsClient object. + */ + RegistryModelVersionsClient getRegistryModelVersions(); + /** * Gets the BatchEndpointsClient object to access its operations. * @@ -191,6 +247,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,10 +282,24 @@ 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. * * @return the WorkspaceFeaturesClient object. */ WorkspaceFeaturesClient getWorkspaceFeatures(); + + /** + * Gets the RegistriesClient object to access its operations. + * + * @return the RegistriesClient object. + */ + RegistriesClient getRegistries(); } 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 cfc4d11cfdb4..547a679cd918 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 5b61e1422061..df3d62f87436 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 03d7ba0721be..84e54dd52dfb 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 da65902f46c4..6284f9bdcd46 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 eb2edf8ff681..2a80c6222557 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 a1f3e0bae9ec..a3da844db0a6 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 59109ed677d3..38d7965a7ea4 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 533a6f679bbb..bcb3faa55ed8 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 f7aa9b60dbda..e83b7a4f1a0a 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 039579d9f50f..ae4a5f982a28 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 2585f01d46cd..8444385bf89e 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 ee7be12767ad..2f4805271c2c 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 6d280d7c1f6f..bd950bf0f9ed 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 000000000000..40f878da75f9 --- /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 78142802c0e5..28a7cd2b51f6 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 317537e9c843..0a3bd35fca24 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 46bea196ac72..149ff167d432 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 7dfed8a382a2..afa0ac76816f 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/OperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java index cf8b8217b303..c216f9607b5f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java @@ -13,7 +13,7 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -24,7 +24,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java new file mode 100644 index 000000000000..f6163d5ca3f0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; + +/** An instance of this class provides access to all the operations defined in RegistriesClient. */ +public interface RegistriesClient { + /** + * List registries by subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List registries by subscription. + * + * @param 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 Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String skip, Context context); + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param 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 Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String registryName, Context context); + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner getByResourceGroup(String resourceGroupName, String registryName); + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context); + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner update(String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body); + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body, Context context); + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RegistryInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, RegistryInner body); + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RegistryInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, RegistryInner body, Context context); + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body); + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java new file mode 100644 index 000000000000..a6918d03849c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; + +/** An instance of this class provides access to all the operations defined in RegistryCodeContainersClient. */ +public interface RegistryCodeContainersClient { + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String codeName, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String codeName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String codeName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerInner get(String resourceGroupName, String registryName, String codeName); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CodeContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CodeContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java new file mode 100644 index 000000000000..0b6f1c388873 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; + +/** An instance of this class provides access to all the operations defined in RegistryCodeVersionsClient. */ +public interface RegistryCodeVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String codeName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String codeName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String codeName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CodeVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CodeVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java new file mode 100644 index 000000000000..15d861ea9ee7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; + +/** An instance of this class provides access to all the operations defined in RegistryComponentContainersClient. */ +public interface RegistryComponentContainersClient { + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String componentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner get(String resourceGroupName, String registryName, String componentName); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner createOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java new file mode 100644 index 000000000000..01eca0d70342 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; + +/** An instance of this class provides access to all the operations defined in RegistryComponentVersionsClient. */ +public interface RegistryComponentVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String componentName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String componentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String componentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, String version); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java new file mode 100644 index 000000000000..edbc1e37a8f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in RegistryEnvironmentContainersClient. */ +public interface RegistryEnvironmentContainersClient { + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String environmentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String environmentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner createOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java new file mode 100644 index 000000000000..136cc869b5ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in RegistryEnvironmentVersionsClient. */ +public interface RegistryEnvironmentVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String environmentName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String environmentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String environmentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, String version); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java new file mode 100644 index 000000000000..1bf85f9a42ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in RegistryModelContainersClient. */ +public interface RegistryModelContainersClient { + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String modelName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner get(String resourceGroupName, String registryName, String modelName); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java new file mode 100644 index 000000000000..f5c391b76196 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in RegistryModelVersionsClient. */ +public interface RegistryModelVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String modelName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String modelName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String modelName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ModelVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ModelVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context); +} 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 000000000000..7d31e4e0937b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; +import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; + +/** An instance of this class provides access to all the operations defined in SchedulesClient. */ +public interface SchedulesClient { + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + ScheduleListViewType listViewType, + Context context); + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 9f057a3dd81f..a8fbefe654ac 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/AmlOperationInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java index 1c3722828205..93368f5fa1ab 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Machine Learning workspace REST API operation. */ +/** Azure Machine Learning REST API operation. */ @Fluent public final class AmlOperationInner { /* 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 5df9352b3489..2f9f079029f7 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 2dc693909a68..1bb284793ff9 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 1b06f986e32f..c826c060a19c 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 1e72fd195191..0e5e310d1d5a 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 c947da16fd56..b33d2b1d43e5 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 ba2ad30514b2..9363d98a8ee6 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 0f32186478b9..ae2ef65197d9 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 aafdd395ffc8..2e584b694246 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 6d31b402f3d6..6d8e012eccac 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 befaa4c64e74..f23efc46bda5 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 dd1ad8649f64..c8847057e17d 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 e0b57af590f2..5dc1b9a4a069 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 70dba5130698..906fa9b74741 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 000000000000..4099b19c102b --- /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 45a01d708025..374a73c47998 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 000000000000..dbe382c4767c --- /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 cf087cc22b9a..e5eeb4594fc5 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 270dd14edc81..8f4fd7929bd1 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 3f1dae7cf453..59ee701f0576 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 9fad748e05c3..e28af7259a20 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 62a31cb1a7b9..dc583434554e 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 50e448958b64..910bb5a3c92e 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/RegistryInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java new file mode 100644 index 000000000000..d86b0a901009 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.RegistryProperties; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The Registry model. */ +@Fluent +public final class RegistryInner extends Resource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private RegistryProperties properties; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @param identity the identity value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @param kind the kind value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public RegistryProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withProperties(RegistryProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku details required for ARM contract for Autoscaling. + * + * @param sku the sku value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public RegistryInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegistryInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model RegistryInner")); + } else { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RegistryInner.class); +} 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 055ba0985b78..f405a70f7ed7 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 000000000000..6040f6705d83 --- /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 138ce3737489..be5f199dd972 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 a23663828128..2cf11bde7d7b 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 29a2eba2110c..000000000000 --- 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 000000000000..c095b2dacda5 --- /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 dccf0f29f1b6..68e8d8fdb655 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 afc399e84a5b..f353aa8e4355 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 21988b519d02..12a8d143e7b5 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/fluent/models/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java index 3e822d30cd96..c4a20504c94a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for AzureMachineLearningWorkspaces. These APIs allow end users to operate on + * Package containing the inner data models for AzureMachineLearningServices. These APIs allow end users to operate on * Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.fluent.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java index f5bef4622975..50522669a1fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for AzureMachineLearningWorkspaces. These APIs allow end users to operate on + * Package containing the service clients for AzureMachineLearningServices. These APIs allow end users to operate on * Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.fluent; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesBuilder.java similarity index 52% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesBuilder.java index f0af624f53ae..48795f9c5d6c 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/AzureMachineLearningServicesBuilder.java @@ -14,9 +14,9 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the AzureMachineLearningWorkspacesImpl type. */ -@ServiceClientBuilder(serviceClients = {AzureMachineLearningWorkspacesImpl.class}) -public final class AzureMachineLearningWorkspacesBuilder { +/** A builder for creating a new instance of the AzureMachineLearningServicesImpl type. */ +@ServiceClientBuilder(serviceClients = {AzureMachineLearningServicesImpl.class}) +public final class AzureMachineLearningServicesBuilder { /* * The ID of the target subscription. */ @@ -26,9 +26,9 @@ public final class AzureMachineLearningWorkspacesBuilder { * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder subscriptionId(String subscriptionId) { + public AzureMachineLearningServicesBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -42,9 +42,9 @@ public AzureMachineLearningWorkspacesBuilder subscriptionId(String subscriptionI * Sets server parameter. * * @param endpoint the endpoint value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder endpoint(String endpoint) { + public AzureMachineLearningServicesBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -58,9 +58,9 @@ public AzureMachineLearningWorkspacesBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder environment(AzureEnvironment environment) { + public AzureMachineLearningServicesBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -74,9 +74,9 @@ public AzureMachineLearningWorkspacesBuilder environment(AzureEnvironment enviro * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder pipeline(HttpPipeline pipeline) { + public AzureMachineLearningServicesBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -90,9 +90,9 @@ public AzureMachineLearningWorkspacesBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder defaultPollInterval(Duration defaultPollInterval) { + public AzureMachineLearningServicesBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -106,37 +106,39 @@ public AzureMachineLearningWorkspacesBuilder defaultPollInterval(Duration defaul * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public AzureMachineLearningServicesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AzureMachineLearningWorkspacesImpl with the provided parameters. + * Builds an instance of AzureMachineLearningServicesImpl with the provided parameters. * - * @return an instance of AzureMachineLearningWorkspacesImpl. + * @return an instance of AzureMachineLearningServicesImpl. */ - public AzureMachineLearningWorkspacesImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } - AzureMachineLearningWorkspacesImpl client = - new AzureMachineLearningWorkspacesImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + public AzureMachineLearningServicesImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + AzureMachineLearningServicesImpl client = + new AzureMachineLearningServicesImpl( + 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/AzureMachineLearningServicesImpl.java similarity index 76% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesImpl.java index e40efd2bb575..6cba29d7c133 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/AzureMachineLearningServicesImpl.java @@ -22,7 +22,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.fluent.AzureMachineLearningWorkspaces; +import com.azure.resourcemanager.machinelearning.fluent.AzureMachineLearningServices; import com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient; import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; @@ -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,16 @@ import com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistriesClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; import com.azure.resourcemanager.machinelearning.fluent.UsagesClient; import com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient; import com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient; @@ -58,9 +69,9 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AzureMachineLearningWorkspacesImpl type. */ -@ServiceClient(builder = AzureMachineLearningWorkspacesBuilder.class) -public final class AzureMachineLearningWorkspacesImpl implements AzureMachineLearningWorkspaces { +/** Initializes a new instance of the AzureMachineLearningServicesImpl type. */ +@ServiceClient(builder = AzureMachineLearningServicesBuilder.class) +public final class AzureMachineLearningServicesImpl implements AzureMachineLearningServices { /** The ID of the target subscription. */ private final String subscriptionId; @@ -241,6 +252,102 @@ public WorkspaceConnectionsClient getWorkspaceConnections() { return this.workspaceConnections; } + /** The RegistryCodeContainersClient object to access its operations. */ + private final RegistryCodeContainersClient registryCodeContainers; + + /** + * Gets the RegistryCodeContainersClient object to access its operations. + * + * @return the RegistryCodeContainersClient object. + */ + public RegistryCodeContainersClient getRegistryCodeContainers() { + return this.registryCodeContainers; + } + + /** The RegistryCodeVersionsClient object to access its operations. */ + private final RegistryCodeVersionsClient registryCodeVersions; + + /** + * Gets the RegistryCodeVersionsClient object to access its operations. + * + * @return the RegistryCodeVersionsClient object. + */ + public RegistryCodeVersionsClient getRegistryCodeVersions() { + return this.registryCodeVersions; + } + + /** The RegistryComponentContainersClient object to access its operations. */ + private final RegistryComponentContainersClient registryComponentContainers; + + /** + * Gets the RegistryComponentContainersClient object to access its operations. + * + * @return the RegistryComponentContainersClient object. + */ + public RegistryComponentContainersClient getRegistryComponentContainers() { + return this.registryComponentContainers; + } + + /** The RegistryComponentVersionsClient object to access its operations. */ + private final RegistryComponentVersionsClient registryComponentVersions; + + /** + * Gets the RegistryComponentVersionsClient object to access its operations. + * + * @return the RegistryComponentVersionsClient object. + */ + public RegistryComponentVersionsClient getRegistryComponentVersions() { + return this.registryComponentVersions; + } + + /** The RegistryEnvironmentContainersClient object to access its operations. */ + private final RegistryEnvironmentContainersClient registryEnvironmentContainers; + + /** + * Gets the RegistryEnvironmentContainersClient object to access its operations. + * + * @return the RegistryEnvironmentContainersClient object. + */ + public RegistryEnvironmentContainersClient getRegistryEnvironmentContainers() { + return this.registryEnvironmentContainers; + } + + /** The RegistryEnvironmentVersionsClient object to access its operations. */ + private final RegistryEnvironmentVersionsClient registryEnvironmentVersions; + + /** + * Gets the RegistryEnvironmentVersionsClient object to access its operations. + * + * @return the RegistryEnvironmentVersionsClient object. + */ + public RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions() { + return this.registryEnvironmentVersions; + } + + /** The RegistryModelContainersClient object to access its operations. */ + private final RegistryModelContainersClient registryModelContainers; + + /** + * Gets the RegistryModelContainersClient object to access its operations. + * + * @return the RegistryModelContainersClient object. + */ + public RegistryModelContainersClient getRegistryModelContainers() { + return this.registryModelContainers; + } + + /** The RegistryModelVersionsClient object to access its operations. */ + private final RegistryModelVersionsClient registryModelVersions; + + /** + * Gets the RegistryModelVersionsClient object to access its operations. + * + * @return the RegistryModelVersionsClient object. + */ + public RegistryModelVersionsClient getRegistryModelVersions() { + return this.registryModelVersions; + } + /** The BatchEndpointsClient object to access its operations. */ private final BatchEndpointsClient batchEndpoints; @@ -385,6 +492,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 +552,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; @@ -445,8 +576,20 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { return this.workspaceFeatures; } + /** The RegistriesClient object to access its operations. */ + private final RegistriesClient registries; + + /** + * Gets the RegistriesClient object to access its operations. + * + * @return the RegistriesClient object. + */ + public RegistriesClient getRegistries() { + return this.registries; + } + /** - * Initializes an instance of AzureMachineLearningWorkspaces client. + * Initializes an instance of AzureMachineLearningServices client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. @@ -455,7 +598,7 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ - AzureMachineLearningWorkspacesImpl( + AzureMachineLearningServicesImpl( HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, @@ -467,7 +610,7 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-02-01-preview"; + this.apiVersion = "2022-10-01-preview"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); this.usages = new UsagesClientImpl(this); @@ -477,6 +620,14 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); + this.registryCodeContainers = new RegistryCodeContainersClientImpl(this); + this.registryCodeVersions = new RegistryCodeVersionsClientImpl(this); + this.registryComponentContainers = new RegistryComponentContainersClientImpl(this); + this.registryComponentVersions = new RegistryComponentVersionsClientImpl(this); + this.registryEnvironmentContainers = new RegistryEnvironmentContainersClientImpl(this); + this.registryEnvironmentVersions = new RegistryEnvironmentVersionsClientImpl(this); + this.registryModelContainers = new RegistryModelContainersClientImpl(this); + this.registryModelVersions = new RegistryModelVersionsClientImpl(this); this.batchEndpoints = new BatchEndpointsClientImpl(this); this.batchDeployments = new BatchDeploymentsClientImpl(this); this.codeContainers = new CodeContainersClientImpl(this); @@ -489,11 +640,14 @@ 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); + this.registries = new RegistriesClientImpl(this); } /** @@ -636,5 +790,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AzureMachineLearningWorkspacesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AzureMachineLearningServicesImpl.class); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/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 fe5494f08928..379a98ca04ce 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 6986819a12fe..4361f0233820 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; @@ -46,22 +46,22 @@ public final class BatchDeploymentsClientImpl implements BatchDeploymentsClient private final BatchDeploymentsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of BatchDeploymentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BatchDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { + BatchDeploymentsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(BatchDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchDeployments to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesBatchDeployments to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") @@ -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(); @@ -1590,7 +1582,8 @@ public BatchDeploymentDataInner createOrUpdate( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1598,7 +1591,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 +1604,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(), @@ -1626,7 +1619,8 @@ private Mono> listNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1635,7 +1629,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 0432be7ce8f1..6042e7100995 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 518a953f8c0d..2abf63af55e9 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 31905c31d7ab..d9578e2223ef 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; @@ -48,21 +48,21 @@ public final class BatchEndpointsClientImpl implements BatchEndpointsClient { private final BatchEndpointsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of BatchEndpointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BatchEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + BatchEndpointsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(BatchEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchEndpoints to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesBatchEndpoints to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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(); } @@ -1596,7 +1568,8 @@ public Response listKeysWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1604,7 +1577,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 +1590,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(), @@ -1632,7 +1605,8 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1641,7 +1615,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 fb052ad121b6..5b0179dccd10 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/CodeContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java new file mode 100644 index 000000000000..eae9e1a14652 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; +import com.azure.resourcemanager.machinelearning.models.CodeContainer; +import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; + +public final class CodeContainerImpl implements CodeContainer, CodeContainer.Definition, CodeContainer.Update { + private CodeContainerInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public CodeContainerProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CodeContainerInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String codeName; + + public CodeContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public CodeContainer create() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistryCodeContainers() + .createOrUpdate(resourceGroupName, registryName, codeName, this.innerModel(), Context.NONE); + return this; + } + + public CodeContainer create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistryCodeContainers() + .createOrUpdate(resourceGroupName, registryName, codeName, this.innerModel(), context); + return this; + } + + CodeContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new CodeContainerInner(); + this.serviceManager = serviceManager; + this.codeName = name; + } + + public CodeContainerImpl update() { + return this; + } + + public CodeContainer apply() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistryCodeContainers() + .createOrUpdate(resourceGroupName, registryName, codeName, this.innerModel(), Context.NONE); + return this; + } + + public CodeContainer apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistryCodeContainers() + .createOrUpdate(resourceGroupName, registryName, codeName, this.innerModel(), context); + return this; + } + + CodeContainerImpl( + CodeContainerInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.codeName = Utils.getValueFromIdByName(innerObject.id(), "codes"); + } + + public CodeContainer refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistryCodeContainers() + .getWithResponse(resourceGroupName, registryName, codeName, Context.NONE) + .getValue(); + return this; + } + + public CodeContainer refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistryCodeContainers() + .getWithResponse(resourceGroupName, registryName, codeName, context) + .getValue(); + return this; + } + + public CodeContainerImpl withProperties(CodeContainerProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java index f52e7e3e1240..c63673b92d82 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; @@ -39,21 +39,21 @@ public final class CodeContainersClientImpl implements CodeContainersClient { private final CodeContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of CodeContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - CodeContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + CodeContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(CodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeContainers to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesCodeContainers to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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,15 +821,16 @@ 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(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -837,7 +838,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 +851,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(), @@ -865,7 +866,8 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -874,7 +876,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 efa1413b9df6..3093a1791bcf 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,132 +49,53 @@ 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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + public CodeContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { + CodeContainerInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new CodeContainerImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private CodeContainersClient serviceClient() { @@ -184,8 +105,4 @@ private CodeContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public CodeContainerDataImpl define(String name) { - return new CodeContainerDataImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java similarity index 50% 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 ab51389d986e..9401e4af4452 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; } @@ -49,103 +49,96 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String codeName; private String version; - public CodeVersionDataImpl withExistingCode(String resourceGroupName, String workspaceName, String name) { + public CodeVersionImpl withExistingCode(String resourceGroupName, String registryName, String codeName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; + this.registryName = registryName; + this.codeName = codeName; return this; } - public CodeVersionData create() { + public CodeVersion create() { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryCodeVersions() + .createOrUpdate(resourceGroupName, registryName, codeName, version, this.innerModel(), Context.NONE); return this; } - public CodeVersionData create(Context context) { + public CodeVersion create(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryCodeVersions() + .createOrUpdate(resourceGroupName, registryName, codeName, version, this.innerModel(), 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() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryCodeVersions() + .createOrUpdate(resourceGroupName, registryName, codeName, version, this.innerModel(), Context.NONE); return this; } - public CodeVersionData apply(Context context) { + public CodeVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryCodeVersions() + .createOrUpdate(resourceGroupName, registryName, codeName, version, this.innerModel(), 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"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.codeName = Utils.getValueFromIdByName(innerObject.id(), "codes"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public CodeVersionData refresh() { + public CodeVersion refresh() { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryCodeVersions() + .getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE) .getValue(); return this; } - public CodeVersionData refresh(Context context) { + public CodeVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryCodeVersions() + .getWithResponse(resourceGroupName, registryName, codeName, version, context) .getValue(); 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 c63458b8eaf4..6e414628b896 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; @@ -39,21 +39,21 @@ public final class CodeVersionsClientImpl implements CodeVersionsClient { private final CodeVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of CodeVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - CodeVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + CodeVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(CodeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeVersions to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesCodeVersions to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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(); } @@ -939,7 +939,8 @@ public Response createOrUpdateWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -947,7 +948,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 +961,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(), @@ -975,7 +976,8 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -984,7 +986,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 a3fb6e2470b4..a371d2513384 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,160 +55,61 @@ 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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public CodeVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { + CodeVersionInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new CodeVersionImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + CodeVersionInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeVersionImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } private CodeVersionsClient serviceClient() { @@ -218,8 +119,4 @@ private CodeVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public CodeVersionDataImpl define(String name) { - return new CodeVersionDataImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java similarity index 52% 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 261dd297a33f..98f219f5889e 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; } @@ -50,98 +50,94 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String componentName; - public ComponentContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public ComponentContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; return this; } - public ComponentContainerData create() { + public ComponentContainer create() { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), Context.NONE); return this; } - public ComponentContainerData create(Context context) { + public ComponentContainer create(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), 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; + this.componentName = name; } - public ComponentContainerDataImpl update() { + public ComponentContainerImpl update() { return this; } - public ComponentContainerData apply() { + public ComponentContainer apply() { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), Context.NONE); return this; } - public ComponentContainerData apply(Context context) { + public ComponentContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), context); return this; } - ComponentContainerDataImpl( - ComponentContainerDataInner innerObject, + ComponentContainerImpl( + ComponentContainerInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "components"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.componentName = Utils.getValueFromIdByName(innerObject.id(), "components"); } - public ComponentContainerData refresh() { + public ComponentContainer refresh() { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getRegistryComponentContainers() + .getWithResponse(resourceGroupName, registryName, componentName, Context.NONE) .getValue(); return this; } - public ComponentContainerData refresh(Context context) { + public ComponentContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) + .getRegistryComponentContainers() + .getWithResponse(resourceGroupName, registryName, componentName, context) .getValue(); 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 98f26e17277e..e0e50243eaa0 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; @@ -40,21 +40,21 @@ public final class ComponentContainersClientImpl implements ComponentContainersC private final ComponentContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ComponentContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComponentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComponentContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ComponentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentContainers to be used by the + * The interface defining all the services for AzureMachineLearningServicesComponentContainers to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @@ -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,19 +833,16 @@ 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(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -857,7 +850,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 +863,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(), @@ -885,7 +878,8 @@ private Mono> listNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -894,7 +888,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 932afbcbf09f..83b1a557caef 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,132 +50,54 @@ 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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + public ComponentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { + ComponentContainerInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new ComponentContainerImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private ComponentContainersClient serviceClient() { @@ -185,8 +107,4 @@ private ComponentContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public ComponentContainerDataImpl define(String name) { - return new ComponentContainerDataImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java similarity index 51% 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 b945042188db..8cda2a3d7a02 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; } @@ -50,104 +50,100 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String componentName; private String version; - public ComponentVersionDataImpl withExistingComponent(String resourceGroupName, String workspaceName, String name) { + public ComponentVersionImpl withExistingComponent( + String resourceGroupName, String registryName, String componentName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; + this.registryName = registryName; + this.componentName = componentName; return this; } - public ComponentVersionData create() { + public ComponentVersion create() { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryComponentVersions() + .createOrUpdate( + resourceGroupName, registryName, componentName, version, this.innerModel(), Context.NONE); return this; } - public ComponentVersionData create(Context context) { + public ComponentVersion create(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryComponentVersions() + .createOrUpdate(resourceGroupName, registryName, componentName, version, this.innerModel(), 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() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryComponentVersions() + .createOrUpdate( + resourceGroupName, registryName, componentName, version, this.innerModel(), Context.NONE); return this; } - public ComponentVersionData apply(Context context) { + public ComponentVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryComponentVersions() + .createOrUpdate(resourceGroupName, registryName, componentName, version, this.innerModel(), context); return this; } - ComponentVersionDataImpl( - ComponentVersionDataInner innerObject, + ComponentVersionImpl( + ComponentVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "components"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.componentName = Utils.getValueFromIdByName(innerObject.id(), "components"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public ComponentVersionData refresh() { + public ComponentVersion refresh() { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryComponentVersions() + .getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE) .getValue(); return this; } - public ComponentVersionData refresh(Context context) { + public ComponentVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryComponentVersions() + .getWithResponse(resourceGroupName, registryName, componentName, version, context) .getValue(); 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 e0d37d18b8f1..e31aeb4efb5c 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; @@ -40,22 +40,22 @@ public final class ComponentVersionsClientImpl implements ComponentVersionsClien private final ComponentVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ComponentVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComponentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComponentVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ComponentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentVersions to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesComponentVersions to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") @@ -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(); } @@ -968,7 +967,8 @@ public Response createOrUpdateWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -976,7 +976,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 +989,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(), @@ -1004,7 +1004,8 @@ private Mono> listNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1013,7 +1014,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 b72d5d00a956..94548e181ed7 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,160 +59,61 @@ 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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public ComponentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { + ComponentVersionInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new ComponentVersionImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ComponentVersionInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } private ComponentVersionsClient serviceClient() { @@ -223,8 +123,4 @@ private ComponentVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public ComponentVersionDataImpl define(String name) { - return new ComponentVersionDataImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java index 4f60b2c8c375..beb513985264 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 7133570caee0..8b4814b08499 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; @@ -51,21 +54,21 @@ public final class ComputesClientImpl implements ComputesClient { private final ComputesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ComputesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComputesClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComputesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComputes to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesComputes to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") @@ -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,10 +2923,194 @@ 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. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2741,7 +3146,8 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2778,7 +3184,8 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2813,7 +3220,8 @@ private Mono> listNodesNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. 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 ade86e3600ec..0142f636a4f3 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 96583e6a09c9..226bd04ddbb2 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 b2bdd57b5e67..5210af15c566 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; @@ -40,21 +40,21 @@ public final class DataContainersClientImpl implements DataContainersClient { private final DataContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DataContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - DataContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + DataContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(DataContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataContainers to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesDataContainers to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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,15 +833,16 @@ 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(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -849,7 +850,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 +863,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(), @@ -877,7 +878,8 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -886,7 +888,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 a06835365fe6..aede6e38b03d 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 eb44fdf76ced..00c2cd10b375 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 020934963bfa..6e099c58910c 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; @@ -40,21 +40,21 @@ public final class DataVersionsClientImpl implements DataVersionsClient { private final DataVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DataVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - DataVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + DataVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(DataVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataVersions to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesDataVersions to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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(); } @@ -994,7 +994,8 @@ public Response createOrUpdateWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1002,7 +1003,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 +1016,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(), @@ -1030,7 +1031,8 @@ private Mono> listNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1039,7 +1041,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 2b82c582e9d6..8787e321745a 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 21f1d2667452..7c6f46611bee 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 8191aaa912b5..de9723d2deb0 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. */ @@ -44,21 +44,21 @@ public final class DatastoresClientImpl implements DatastoresClient { private final DatastoresService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DatastoresClientImpl. * * @param client the instance of the service client containing this operation class. */ - DatastoresClientImpl(AzureMachineLearningWorkspacesImpl client) { + DatastoresClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDatastores to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesDatastores to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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) @@ -1180,7 +1184,8 @@ public Response listSecretsWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1188,7 +1193,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 +1206,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(), @@ -1216,7 +1221,8 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1225,7 +1231,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 376f7c9a45ff..e6530a0d68d1 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 51% 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 b634d9599daf..4a002613a732 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; } @@ -50,98 +50,94 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String environmentName; - public EnvironmentContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public EnvironmentContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; return this; } - public EnvironmentContainerData create() { + public EnvironmentContainer create() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), Context.NONE); return this; } - public EnvironmentContainerData create(Context context) { + public EnvironmentContainer create(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), 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; + this.environmentName = name; } - public EnvironmentContainerDataImpl update() { + public EnvironmentContainerImpl update() { return this; } - public EnvironmentContainerData apply() { + public EnvironmentContainer apply() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), Context.NONE); return this; } - public EnvironmentContainerData apply(Context context) { + public EnvironmentContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), context); return this; } - EnvironmentContainerDataImpl( - EnvironmentContainerDataInner innerObject, + EnvironmentContainerImpl( + EnvironmentContainerInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "environments"); } - public EnvironmentContainerData refresh() { + public EnvironmentContainer refresh() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getRegistryEnvironmentContainers() + .getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE) .getValue(); return this; } - public EnvironmentContainerData refresh(Context context) { + public EnvironmentContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) + .getRegistryEnvironmentContainers() + .getWithResponse(resourceGroupName, registryName, environmentName, context) .getValue(); 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 c2feb7dd5e19..707ed7657a13 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; @@ -40,14 +40,14 @@ public final class EnvironmentContainersClientImpl implements EnvironmentContain private final EnvironmentContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of EnvironmentContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - EnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + EnvironmentContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy .create(EnvironmentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); @@ -55,7 +55,7 @@ public final class EnvironmentContainersClientImpl implements EnvironmentContain } /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentContainers to be used by the + * The interface defining all the services for AzureMachineLearningServicesEnvironmentContainers to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @@ -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,19 +834,16 @@ 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(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -858,7 +851,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 +864,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(), @@ -886,7 +879,8 @@ private Mono> listNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -895,8 +889,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 f562d3cb0a38..349117742b83 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,132 +50,54 @@ 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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + public EnvironmentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { + EnvironmentContainerInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new EnvironmentContainerImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private EnvironmentContainersClient serviceClient() { @@ -186,8 +107,4 @@ private EnvironmentContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public EnvironmentContainerDataImpl define(String name) { - return new EnvironmentContainerDataImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java similarity index 52% 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 1636870e45e3..87f0ea22c6ca 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; } @@ -50,105 +50,101 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String environmentName; private String version; - public EnvironmentVersionDataImpl withExistingEnvironment( - String resourceGroupName, String workspaceName, String name) { + public EnvironmentVersionImpl withExistingEnvironment( + String resourceGroupName, String registryName, String environmentName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; + this.registryName = registryName; + this.environmentName = environmentName; return this; } - public EnvironmentVersionData create() { + public EnvironmentVersion create() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryEnvironmentVersions() + .createOrUpdate( + resourceGroupName, registryName, environmentName, version, this.innerModel(), Context.NONE); return this; } - public EnvironmentVersionData create(Context context) { + public EnvironmentVersion create(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryEnvironmentVersions() + .createOrUpdate(resourceGroupName, registryName, environmentName, version, this.innerModel(), 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() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryEnvironmentVersions() + .createOrUpdate( + resourceGroupName, registryName, environmentName, version, this.innerModel(), Context.NONE); return this; } - public EnvironmentVersionData apply(Context context) { + public EnvironmentVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryEnvironmentVersions() + .createOrUpdate(resourceGroupName, registryName, environmentName, version, this.innerModel(), context); return this; } - EnvironmentVersionDataImpl( - EnvironmentVersionDataInner innerObject, + EnvironmentVersionImpl( + EnvironmentVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "environments"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public EnvironmentVersionData refresh() { + public EnvironmentVersion refresh() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryEnvironmentVersions() + .getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE) .getValue(); return this; } - public EnvironmentVersionData refresh(Context context) { + public EnvironmentVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryEnvironmentVersions() + .getWithResponse(resourceGroupName, registryName, environmentName, version, context) .getValue(); 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 224d59b216f2..1fe4682c1205 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; @@ -40,21 +40,21 @@ public final class EnvironmentVersionsClientImpl implements EnvironmentVersionsC private final EnvironmentVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of EnvironmentVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - EnvironmentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + EnvironmentVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(EnvironmentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentVersions to be used by the + * The interface defining all the services for AzureMachineLearningServicesEnvironmentVersions to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @@ -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(); } @@ -973,7 +970,8 @@ public Response createOrUpdateWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -981,7 +979,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 +992,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(), @@ -1009,7 +1007,8 @@ private Mono> listNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1018,7 +1017,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 a7a4c36384cb..1bd06219af57 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,160 +60,61 @@ 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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public EnvironmentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { + EnvironmentVersionInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new EnvironmentVersionImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + EnvironmentVersionInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } private EnvironmentVersionsClient serviceClient() { @@ -223,8 +124,4 @@ private EnvironmentVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public EnvironmentVersionDataImpl define(String name) { - return new EnvironmentVersionDataImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExportSummaryImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExportSummaryImpl.java new file mode 100644 index 000000000000..0fb6b3f2e8aa --- /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 640159cd0344..1b26fd5f42d4 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 f2c11073c9e4..31b77c965994 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; @@ -46,20 +46,20 @@ public final class JobsClientImpl implements JobsClient { private final JobsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of JobsClientImpl. * * @param client the instance of the service client containing this operation class. */ - JobsClientImpl(AzureMachineLearningWorkspacesImpl client) { + JobsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesJobs to be used by the proxy service to + * The interface defining all the services for AzureMachineLearningServicesJobs to be used by the proxy service to * perform REST calls. */ @Host("{$host}") @@ -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,18 +1285,17 @@ 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(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1206,7 +1303,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 +1316,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(), @@ -1234,7 +1331,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1243,7 +1341,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 bbd2a142394e..138a67bb6a0d 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 000000000000..4c611689c17a --- /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 000000000000..30af327e0d6b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsClientImpl.java @@ -0,0 +1,1825 @@ +// Copyright (c) Microsoft Corporation. All rights 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 AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of LabelingJobsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LabelingJobsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy.create(LabelingJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesLabelingJobs 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 URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of 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 URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of 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 000000000000..55ad56152b7c --- /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 51% 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 48ebb00f4f0d..8e02d001475e 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; } @@ -50,98 +49,93 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String modelName; - public ModelContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public ModelContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; return this; } - public ModelContainerData create() { + public ModelContainer create() { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryModelContainers() + .createOrUpdate(resourceGroupName, registryName, modelName, this.innerModel(), Context.NONE); return this; } - public ModelContainerData create(Context context) { + public ModelContainer create(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryModelContainers() + .createOrUpdate(resourceGroupName, registryName, modelName, this.innerModel(), 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; + this.modelName = name; } - public ModelContainerDataImpl update() { + public ModelContainerImpl update() { return this; } - public ModelContainerData apply() { + public ModelContainer apply() { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryModelContainers() + .createOrUpdate(resourceGroupName, registryName, modelName, this.innerModel(), Context.NONE); return this; } - public ModelContainerData apply(Context context) { + public ModelContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryModelContainers() + .createOrUpdate(resourceGroupName, registryName, modelName, this.innerModel(), context); return this; } - ModelContainerDataImpl( - ModelContainerDataInner innerObject, + ModelContainerImpl( + ModelContainerInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.modelName = Utils.getValueFromIdByName(innerObject.id(), "models"); } - public ModelContainerData refresh() { + public ModelContainer refresh() { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getRegistryModelContainers() + .getWithResponse(resourceGroupName, registryName, modelName, Context.NONE) .getValue(); return this; } - public ModelContainerData refresh(Context context) { + public ModelContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) + .getRegistryModelContainers() + .getWithResponse(resourceGroupName, registryName, modelName, context) .getValue(); 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 66d750218797..b131c27156e6 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; @@ -40,21 +40,21 @@ public final class ModelContainersClientImpl implements ModelContainersClient { private final ModelContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ModelContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ModelContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + ModelContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelContainers to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesModelContainers to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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,15 +858,16 @@ 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(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -874,7 +875,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 +888,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(), @@ -902,7 +903,8 @@ private Mono> listNextSinglePageAsync(Str /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -911,7 +913,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 2a7ed48e4af3..fea1a9da2442 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,132 +55,53 @@ 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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + public ModelContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { + ModelContainerInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new ModelContainerImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private ModelContainersClient serviceClient() { @@ -190,8 +111,4 @@ private ModelContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public ModelContainerDataImpl define(String name) { - return new ModelContainerDataImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java similarity index 52% 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 4fe87793e74e..94e781ec77cf 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; } @@ -50,103 +49,97 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String modelName; private String version; - public ModelVersionDataImpl withExistingModel(String resourceGroupName, String workspaceName, String name) { + public ModelVersionImpl withExistingModel(String resourceGroupName, String registryName, String modelName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; + this.registryName = registryName; + this.modelName = modelName; return this; } - public ModelVersionData create() { + public ModelVersion create() { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryModelVersions() + .createOrUpdate(resourceGroupName, registryName, modelName, version, this.innerModel(), Context.NONE); return this; } - public ModelVersionData create(Context context) { + public ModelVersion create(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryModelVersions() + .createOrUpdate(resourceGroupName, registryName, modelName, version, this.innerModel(), 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() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryModelVersions() + .createOrUpdate(resourceGroupName, registryName, modelName, version, this.innerModel(), Context.NONE); return this; } - public ModelVersionData apply(Context context) { + public ModelVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryModelVersions() + .createOrUpdate(resourceGroupName, registryName, modelName, version, this.innerModel(), context); return this; } - ModelVersionDataImpl( - ModelVersionDataInner innerObject, + ModelVersionImpl( + ModelVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.modelName = Utils.getValueFromIdByName(innerObject.id(), "models"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } - public ModelVersionData refresh() { + public ModelVersion refresh() { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryModelVersions() + .getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE) .getValue(); return this; } - public ModelVersionData refresh(Context context) { + public ModelVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryModelVersions() + .getWithResponse(resourceGroupName, registryName, modelName, version, context) .getValue(); 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 c22a87b4e845..3c837ea92ac3 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; @@ -40,21 +40,21 @@ public final class ModelVersionsClientImpl implements ModelVersionsClient { private final ModelVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ModelVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ModelVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + ModelVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ModelVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelVersions to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesModelVersions to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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(); } @@ -1127,7 +1127,8 @@ public Response createOrUpdateWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1135,7 +1136,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 +1149,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(), @@ -1163,7 +1164,8 @@ private Mono> listNextSinglePageAsync(Strin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1172,7 +1174,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 5b030dde0a88..ec1b0d9a6b19 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,160 +79,61 @@ 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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public ModelVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { + ModelVersionInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new ModelVersionImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ModelVersionInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelVersionImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } private ModelVersionsClient serviceClient() { @@ -242,8 +143,4 @@ private ModelVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public ModelVersionDataImpl define(String name) { - return new ModelVersionDataImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/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 0327c0414990..2666a2239f6a 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 5f49d40201d0..d350349d9a80 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; @@ -51,22 +51,22 @@ public final class OnlineDeploymentsClientImpl implements OnlineDeploymentsClien private final OnlineDeploymentsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OnlineDeploymentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OnlineDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OnlineDeploymentsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(OnlineDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineDeployments to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesOnlineDeployments to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") @@ -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(); @@ -2136,7 +2128,8 @@ public PagedIterable listSkus( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2144,7 +2137,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 +2150,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(), @@ -2172,7 +2165,8 @@ private Mono> listNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2181,7 +2175,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.")); } @@ -2209,7 +2203,8 @@ private Mono> listNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2245,7 +2240,8 @@ private Mono> listSkusNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. 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 85265edfcdeb..bd22d0ec5e69 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 d224776249dd..7fdbb9ba754f 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 7f3222df5d62..b6a7138b5163 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; @@ -52,21 +52,21 @@ public final class OnlineEndpointsClientImpl implements OnlineEndpointsClient { private final OnlineEndpointsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OnlineEndpointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OnlineEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OnlineEndpointsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(OnlineEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineEndpoints to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesOnlineEndpoints to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -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(); } @@ -2210,7 +2201,8 @@ public Response getTokenWithResponse( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2218,7 +2210,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 +2223,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(), @@ -2246,7 +2238,8 @@ private Mono> listNextSinglePageAsync(Str /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2255,7 +2248,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 d5c61a521bcf..d07c310deef3 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/OperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java index a6e01f602a4a..dfd69eaeb667 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java @@ -35,21 +35,21 @@ public final class OperationsClientImpl implements OperationsClient { private final OperationsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OperationsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOperations to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesOperations to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -67,7 +67,7 @@ Mono> list( } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -94,7 +94,7 @@ private Mono> listSinglePageAsync() { } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,7 +122,7 @@ private Mono> listSinglePageAsync(Context conte } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -134,7 +134,7 @@ private PagedFlux listAsync() { } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +148,7 @@ private PagedFlux listAsync(Context context) { } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -161,7 +161,7 @@ public PagedIterable list() { } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java index 9aaae4a4002c..534fb8f2b293 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java @@ -39,14 +39,14 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi private final PrivateEndpointConnectionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateEndpointConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + PrivateEndpointConnectionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy .create( @@ -55,8 +55,8 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi } /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateEndpointConnections to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesPrivateEndpointConnections to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java index 5c5d1ed0c21b..6c0cb545d1f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java @@ -31,14 +31,14 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource private final PrivateLinkResourcesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateLinkResourcesClientImpl(AzureMachineLearningWorkspacesImpl client) { + PrivateLinkResourcesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); @@ -46,7 +46,7 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource } /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateLinkResources to be used by the + * The interface defining all the services for AzureMachineLearningServicesPrivateLinkResources to be used by the * proxy service to perform REST calls. */ @Host("{$host}") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java index 6a4f8df42d40..b048b449103a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java @@ -40,21 +40,21 @@ public final class QuotasClientImpl implements QuotasClient { private final QuotasService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of QuotasClientImpl. * * @param client the instance of the service client containing this operation class. */ - QuotasClientImpl(AzureMachineLearningWorkspacesImpl client) { + QuotasClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(QuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesQuotas to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesQuotas to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") @@ -406,7 +406,8 @@ public PagedIterable list(String location, Context context) /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -442,7 +443,8 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java new file mode 100644 index 000000000000..4175c2bc2db1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java @@ -0,0 +1,1393 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.RegistriesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.RegistryTrackedResourceArmPaginatedResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistriesClient. */ +public final class RegistriesClientImpl implements RegistriesClient { + /** The proxy service used to perform REST calls. */ + private final RegistriesService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistriesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistriesClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy.create(RegistriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistries to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistriesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PartialRegistryPartialTrackedResource body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RegistryInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List registries by subscription. + * + * @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 Registry entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String skip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + 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 registries by subscription. + * + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String skip, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List registries by subscription. + * + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(skip), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List registries by subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(skip), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List registries by subscription. + * + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skip, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(skip, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List registries by subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String skip = null; + return new PagedIterable<>(listAsync(skip)); + } + + /** + * List registries by subscription. + * + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String skip, Context context) { + return new PagedIterable<>(listAsync(skip, context)); + } + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String skip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + 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 registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String skip, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String skip = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String skip = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip)); + } + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip, context)); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String registryName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String registryName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName) { + return deleteWithResponseAsync(resourceGroupName, registryName).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName) { + deleteAsync(resourceGroupName, registryName).block(); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String registryName, Context context) { + return deleteWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String registryName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String registryName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { + return getByResourceGroupAsync(resourceGroupName, registryName).block(); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body) { + return updateWithResponseAsync(resourceGroupName, registryName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner update( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body) { + return updateAsync(resourceGroupName, registryName, body).block(); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body, Context context) { + return updateWithResponseAsync(resourceGroupName, registryName, body, context).block(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, RegistryInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RegistryInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, RegistryInner body) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + RegistryInner.class, + RegistryInner.class, + this.client.getContext()); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RegistryInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), RegistryInner.class, RegistryInner.class, context); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RegistryInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, RegistryInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, body).getSyncPoller(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RegistryInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, body, context).getSyncPoller(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, RegistryInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, body).block(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner createOrUpdate( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

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

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

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 Registry entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java new file mode 100644 index 000000000000..7b64bb31df96 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistriesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.Registries; +import com.azure.resourcemanager.machinelearning.models.Registry; + +public final class RegistriesImpl implements Registries { + private static final ClientLogger LOGGER = new ClientLogger(RegistriesImpl.class); + + private final RegistriesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistriesImpl( + RegistriesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable list(String skip, Context context) { + PagedIterable inner = this.serviceClient().list(skip, context); + return Utils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, skip, context); + return Utils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public void deleteByResourceGroup(String resourceGroupName, String registryName) { + this.serviceClient().delete(resourceGroupName, registryName); + } + + public Response deleteWithResponse(String resourceGroupName, String registryName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, registryName, context); + } + + public Registry getByResourceGroup(String resourceGroupName, String registryName) { + RegistryInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, registryName); + if (inner != null) { + return new RegistryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, registryName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RegistryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Registry 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, registryName, context); + } + + public void deleteById(String id) { + String resourceGroupName = 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + this.deleteWithResponse(resourceGroupName, registryName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + return this.deleteWithResponse(resourceGroupName, registryName, context); + } + + private RegistriesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public RegistryImpl define(String name) { + return new RegistryImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java new file mode 100644 index 000000000000..bf076818bf60 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java @@ -0,0 +1,1119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; +import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryCodeContainersClient. */ +public final class RegistryCodeContainersClientImpl implements RegistryCodeContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryCodeContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryCodeContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryCodeContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryCodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryCodeContainers to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistryCodeContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/codes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CodeContainerInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String codeName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String codeName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String codeName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, codeName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String codeName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, codeName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String codeName) { + return beginDeleteAsync(resourceGroupName, registryName, codeName).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String codeName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String codeName) { + return beginDeleteAsync(resourceGroupName, registryName, codeName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String codeName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String codeName) { + deleteAsync(resourceGroupName, registryName, codeName).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String codeName, Context context) { + deleteAsync(resourceGroupName, registryName, codeName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String codeName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String codeName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String codeName) { + return getWithResponseAsync(resourceGroupName, registryName, codeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerInner get(String resourceGroupName, String registryName, String codeName) { + return getAsync(resourceGroupName, registryName, codeName).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, codeName, context).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CodeContainerInner.class, + CodeContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CodeContainerInner.class, CodeContainerInner.class, context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CodeContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CodeContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, codeName, body).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java new file mode 100644 index 000000000000..af549925d094 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; +import com.azure.resourcemanager.machinelearning.models.CodeContainer; +import com.azure.resourcemanager.machinelearning.models.RegistryCodeContainers; + +public final class RegistryCodeContainersImpl implements RegistryCodeContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryCodeContainersImpl.class); + + private final RegistryCodeContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryCodeContainersImpl( + RegistryCodeContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, context); + return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String codeName) { + this.serviceClient().delete(resourceGroupName, registryName, codeName); + } + + public void delete(String resourceGroupName, String registryName, String codeName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, context); + } + + public CodeContainer get(String resourceGroupName, String registryName, String codeName) { + CodeContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, codeName); + if (inner != null) { + return new CodeContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CodeContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, codeName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, codeName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + this.delete(resourceGroupName, registryName, codeName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + this.delete(resourceGroupName, registryName, codeName, context); + } + + private RegistryCodeContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public CodeContainerImpl define(String name) { + return new CodeContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java new file mode 100644 index 000000000000..4467b87ea455 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java @@ -0,0 +1,1256 @@ +// Copyright (c) Microsoft Corporation. All rights 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.RegistryCodeVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryCodeVersionsClient. */ +public final class RegistryCodeVersionsClientImpl implements RegistryCodeVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryCodeVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryCodeVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryCodeVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryCodeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryCodeVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistryCodeVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CodeVersionInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String codeName, String orderBy, Integer top, String skip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + orderBy, + top, + skip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + orderBy, + top, + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String codeName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String codeName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, codeName, orderBy, top, skip)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, codeName, orderBy, top, skip, context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String codeName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String codeName, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, codeName, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, codeName, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String codeName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String codeName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String codeName, String version) { + deleteAsync(resourceGroupName, registryName, codeName, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + deleteAsync(resourceGroupName, registryName, codeName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String codeName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String codeName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, codeName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version) { + return getAsync(resourceGroupName, registryName, codeName, version).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, codeName, version, context).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CodeVersionInner.class, + CodeVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CodeVersionInner.class, CodeVersionInner.class, context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CodeVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CodeVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java new file mode 100644 index 000000000000..e208361f6091 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.models.CodeVersion; +import com.azure.resourcemanager.machinelearning.models.RegistryCodeVersions; + +public final class RegistryCodeVersionsImpl implements RegistryCodeVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryCodeVersionsImpl.class); + + private final RegistryCodeVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryCodeVersionsImpl( + RegistryCodeVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName, String codeName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, codeName); + return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, codeName, orderBy, top, skip, context); + return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String codeName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, version); + } + + public void delete( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, version, context); + } + + public CodeVersion get(String resourceGroupName, String registryName, String codeName, String version) { + CodeVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, codeName, version); + if (inner != null) { + return new CodeVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CodeVersion 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, codeName, version, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, codeName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, codeName, version, context); + } + + private RegistryCodeVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public CodeVersionImpl define(String name) { + return new CodeVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java new file mode 100644 index 000000000000..09090cc58ced --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java @@ -0,0 +1,1146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryComponentContainersClient. */ +public final class RegistryComponentContainersClientImpl implements RegistryComponentContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryComponentContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryComponentContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryComponentContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + RegistryComponentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryComponentContainers to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistryComponentContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/components") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ComponentContainerInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String componentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String componentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String componentName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, componentName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String componentName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, componentName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String componentName) { + return beginDeleteAsync(resourceGroupName, registryName, componentName).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String componentName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String componentName) { + return beginDeleteAsync(resourceGroupName, registryName, componentName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String componentName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String componentName) { + deleteAsync(resourceGroupName, registryName, componentName).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String componentName, Context context) { + deleteAsync(resourceGroupName, registryName, componentName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String componentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String componentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String componentName) { + return getWithResponseAsync(resourceGroupName, registryName, componentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner get(String resourceGroupName, String registryName, String componentName) { + return getAsync(resourceGroupName, registryName, componentName).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, context).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ComponentContainerInner.class, + ComponentContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ComponentContainerInner.class, + ComponentContainerInner.class, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body, context).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner createOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, componentName, body).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, componentName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java new file mode 100644 index 000000000000..0de965346e2c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ComponentContainer; +import com.azure.resourcemanager.machinelearning.models.RegistryComponentContainers; + +public final class RegistryComponentContainersImpl implements RegistryComponentContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryComponentContainersImpl.class); + + private final RegistryComponentContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryComponentContainersImpl( + RegistryComponentContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, context); + return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String componentName) { + this.serviceClient().delete(resourceGroupName, registryName, componentName); + } + + public void delete(String resourceGroupName, String registryName, String componentName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, context); + } + + public ComponentContainer get(String resourceGroupName, String registryName, String componentName) { + ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, componentName); + if (inner != null) { + return new ComponentContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ComponentContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, componentName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, componentName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + this.delete(resourceGroupName, registryName, componentName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + this.delete(resourceGroupName, registryName, componentName, context); + } + + private RegistryComponentContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ComponentContainerImpl define(String name) { + return new ComponentContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java new file mode 100644 index 000000000000..4b88d884ab11 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java @@ -0,0 +1,1285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryComponentVersionsClient. */ +public final class RegistryComponentVersionsClientImpl implements RegistryComponentVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryComponentVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryComponentVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryComponentVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + RegistryComponentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryComponentVersions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistryComponentVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions" + + "/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions" + + "/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions" + + "/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ComponentVersionInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String componentName, String orderBy, Integer top, String skip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + orderBy, + top, + skip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + orderBy, + top, + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String componentName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String componentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String componentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String componentName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String componentName, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, componentName, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, componentName, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String componentName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String componentName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String componentName, String version) { + deleteAsync(resourceGroupName, registryName, componentName, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + deleteAsync(resourceGroupName, registryName, componentName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String componentName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String componentName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner get( + String resourceGroupName, String registryName, String componentName, String version) { + return getAsync(resourceGroupName, registryName, componentName, version).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, version, context).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ComponentVersionInner.class, + ComponentVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ComponentVersionInner.class, ComponentVersionInner.class, context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body).getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, componentName, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java new file mode 100644 index 000000000000..5ff36b6de195 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ComponentVersion; +import com.azure.resourcemanager.machinelearning.models.RegistryComponentVersions; + +public final class RegistryComponentVersionsImpl implements RegistryComponentVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryComponentVersionsImpl.class); + + private final RegistryComponentVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryComponentVersionsImpl( + RegistryComponentVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName, String componentName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, componentName); + return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, componentName, orderBy, top, skip, context); + return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String componentName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, version); + } + + public void delete( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, version, context); + } + + public ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version) { + ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, componentName, version); + if (inner != null) { + return new ComponentVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ComponentVersion 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, componentName, version, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, componentName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, componentName, version, context); + } + + private RegistryComponentVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ComponentVersionImpl define(String name) { + return new ComponentVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java new file mode 100644 index 000000000000..f6e193aa3a5c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java @@ -0,0 +1,1168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryEnvironmentContainersClient. */ +public final class RegistryEnvironmentContainersClientImpl implements RegistryEnvironmentContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryEnvironmentContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryEnvironmentContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryEnvironmentContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + RegistryEnvironmentContainersService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryEnvironmentContainers to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistryEnvironmentContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/environments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EnvironmentContainerInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String environmentName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, environmentName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String environmentName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, environmentName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String environmentName) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String environmentName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String environmentName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String environmentName) { + deleteAsync(resourceGroupName, registryName, environmentName).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String environmentName, Context context) { + deleteAsync(resourceGroupName, registryName, environmentName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String environmentName) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName) { + return getAsync(resourceGroupName, registryName, environmentName).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, context).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + EnvironmentContainerInner.class, + EnvironmentContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + EnvironmentContainerInner.class, + EnvironmentContainerInner.class, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context) + .getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner createOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, environmentName, body).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java new file mode 100644 index 000000000000..5c23d7e33614 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentContainers; + +public final class RegistryEnvironmentContainersImpl implements RegistryEnvironmentContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryEnvironmentContainersImpl.class); + + private final RegistryEnvironmentContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryEnvironmentContainersImpl( + RegistryEnvironmentContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String environmentName) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName); + } + + public void delete(String resourceGroupName, String registryName, String environmentName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, context); + } + + public EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName) { + EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, environmentName); + if (inner != null) { + return new EnvironmentContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, environmentName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + this.delete(resourceGroupName, registryName, environmentName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + this.delete(resourceGroupName, registryName, environmentName, context); + } + + private RegistryEnvironmentContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public EnvironmentContainerImpl define(String name) { + return new EnvironmentContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java new file mode 100644 index 000000000000..ac7e736f2980 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java @@ -0,0 +1,1330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryEnvironmentVersionsClient. */ +public final class RegistryEnvironmentVersionsClientImpl implements RegistryEnvironmentVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryEnvironmentVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryEnvironmentVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryEnvironmentVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + RegistryEnvironmentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryEnvironmentVersions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistryEnvironmentVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + + "/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions" + + "/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions" + + "/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions" + + "/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EnvironmentVersionInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + orderBy, + top, + skip, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + orderBy, + top, + skip, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType) { + return new PagedFlux<>( + () -> + listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String environmentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> + listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String environmentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String environmentName, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String environmentName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String environmentName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String environmentName, String version) { + deleteAsync(resourceGroupName, registryName, environmentName, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + deleteAsync(resourceGroupName, registryName, environmentName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String environmentName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner get( + String resourceGroupName, String registryName, String environmentName, String version) { + return getAsync(resourceGroupName, registryName, environmentName, version).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, version, context).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + EnvironmentVersionInner.class, + EnvironmentVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + EnvironmentVersionInner.class, + EnvironmentVersionInner.class, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java new file mode 100644 index 000000000000..2982294b4b4e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentVersions; + +public final class RegistryEnvironmentVersionsImpl implements RegistryEnvironmentVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryEnvironmentVersionsImpl.class); + + private final RegistryEnvironmentVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryEnvironmentVersionsImpl( + RegistryEnvironmentVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String resourceGroupName, String registryName, String environmentName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, environmentName); + return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context); + return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String environmentName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, version); + } + + public void delete( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, version, context); + } + + public EnvironmentVersion get( + String resourceGroupName, String registryName, String environmentName, String version) { + EnvironmentVersionInner inner = + this.serviceClient().get(resourceGroupName, registryName, environmentName, version); + if (inner != null) { + return new EnvironmentVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentVersion 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, environmentName, version, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, environmentName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, environmentName, version, context); + } + + private RegistryEnvironmentVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public EnvironmentVersionImpl define(String name) { + return new EnvironmentVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java new file mode 100644 index 000000000000..d2db904372a3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Registry; +import com.azure.resourcemanager.machinelearning.models.RegistryProperties; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class RegistryImpl implements Registry, Registry.Definition, Registry.Update { + private RegistryInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public RegistryProperties properties() { + return this.innerModel().properties(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public RegistryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private PartialRegistryPartialTrackedResource updateBody; + + public RegistryImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Registry create() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .createOrUpdate(resourceGroupName, registryName, this.innerModel(), Context.NONE); + return this; + } + + public Registry create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .createOrUpdate(resourceGroupName, registryName, this.innerModel(), context); + return this; + } + + RegistryImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new RegistryInner(); + this.serviceManager = serviceManager; + this.registryName = name; + } + + public RegistryImpl update() { + this.updateBody = new PartialRegistryPartialTrackedResource(); + return this; + } + + public Registry apply() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .updateWithResponse(resourceGroupName, registryName, updateBody, Context.NONE) + .getValue(); + return this; + } + + public Registry apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .updateWithResponse(resourceGroupName, registryName, updateBody, context) + .getValue(); + return this; + } + + RegistryImpl( + RegistryInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + } + + public Registry refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE) + .getValue(); + return this; + } + + public Registry refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .getByResourceGroupWithResponse(resourceGroupName, registryName, context) + .getValue(); + return this; + } + + public RegistryImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public RegistryImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public RegistryImpl withProperties(RegistryProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public RegistryImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public RegistryImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public RegistryImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateBody.withKind(kind); + return this; + } + } + + public RegistryImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public RegistryImpl withIdentity(PartialManagedServiceIdentity identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public RegistryImpl withProperties(Object properties) { + this.updateBody.withProperties(properties); + return this; + } + + public RegistryImpl withSku(PartialSku sku) { + this.updateBody.withSku(sku); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java new file mode 100644 index 000000000000..0b9fe461619d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java @@ -0,0 +1,1131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryModelContainersClient. */ +public final class RegistryModelContainersClientImpl implements RegistryModelContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryModelContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryModelContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryModelContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryModelContainers to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistryModelContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/models") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ModelContainerInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String modelName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String modelName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String modelName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, modelName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String modelName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, modelName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String modelName) { + return beginDeleteAsync(resourceGroupName, registryName, modelName).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String modelName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String modelName) { + return beginDeleteAsync(resourceGroupName, registryName, modelName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String modelName) { + deleteAsync(resourceGroupName, registryName, modelName).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String modelName, Context context) { + deleteAsync(resourceGroupName, registryName, modelName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String modelName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String modelName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String modelName) { + return getWithResponseAsync(resourceGroupName, registryName, modelName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner get(String resourceGroupName, String registryName, String modelName) { + return getAsync(resourceGroupName, registryName, modelName).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, context).block(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ModelContainerInner.class, + ModelContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ModelContainerInner.class, ModelContainerInner.class, context); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body).getSyncPoller(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).getSyncPoller(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, modelName, body).block(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java new file mode 100644 index 000000000000..4afabcd74675 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.ModelContainer; +import com.azure.resourcemanager.machinelearning.models.RegistryModelContainers; + +public final class RegistryModelContainersImpl implements RegistryModelContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryModelContainersImpl.class); + + private final RegistryModelContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryModelContainersImpl( + RegistryModelContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); + return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String modelName) { + this.serviceClient().delete(resourceGroupName, registryName, modelName); + } + + public void delete(String resourceGroupName, String registryName, String modelName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, context); + } + + public ModelContainer get(String resourceGroupName, String registryName, String modelName) { + ModelContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, modelName); + if (inner != null) { + return new ModelContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ModelContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, modelName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, modelName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + this.delete(resourceGroupName, registryName, modelName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + this.delete(resourceGroupName, registryName, modelName, context); + } + + private RegistryModelContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ModelContainerImpl define(String name) { + return new ModelContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java new file mode 100644 index 000000000000..aa8d6a2e5b3e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java @@ -0,0 +1,1404 @@ +// Copyright (c) Microsoft Corporation. All rights 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.RegistryModelVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryModelVersionsClient. */ +public final class RegistryModelVersionsClientImpl implements RegistryModelVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryModelVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryModelVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryModelVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryModelVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryModelVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface RegistryModelVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("version") String version, + @QueryParam("description") String description, + @QueryParam("tags") String tags, + @QueryParam("properties") String properties, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ModelVersionInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName) { + final String skip = null; + final String orderBy = null; + final Integer top = null; + final String version = null; + final String description = null; + final String tags = null; + final String properties = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String modelName) { + final String skip = null; + final String orderBy = null; + final Integer top = null; + final String version = null; + final String description = null; + final String tags = null; + final String properties = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + listAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context) { + return new PagedIterable<>( + listAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String modelName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String modelName, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, modelName, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, modelName, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String modelName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String modelName, String version) { + deleteAsync(resourceGroupName, registryName, modelName, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + deleteAsync(resourceGroupName, registryName, modelName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String modelName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String modelName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version) { + return getAsync(resourceGroupName, registryName, modelName, version).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, version, context).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ModelVersionInner.class, + ModelVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ModelVersionInner.class, ModelVersionInner.class, context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ModelVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ModelVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java new file mode 100644 index 000000000000..ddaf2e7c95c0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.ModelVersion; +import com.azure.resourcemanager.machinelearning.models.RegistryModelVersions; + +public final class RegistryModelVersionsImpl implements RegistryModelVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryModelVersionsImpl.class); + + private final RegistryModelVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryModelVersionsImpl( + RegistryModelVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName, String modelName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, modelName); + return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + context); + return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String modelName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, version); + } + + public void delete( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, version, context); + } + + public ModelVersion get(String resourceGroupName, String registryName, String modelName, String version) { + ModelVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, modelName, version); + if (inner != null) { + return new ModelVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ModelVersion 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, modelName, version, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, modelName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, modelName, version, context); + } + + private RegistryModelVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ModelVersionImpl define(String name) { + return new ModelVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java similarity index 55% 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/ScheduleImpl.java index 0264bd5924f4..a4b080c85af2 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/ScheduleImpl.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.ScheduleInner; +import com.azure.resourcemanager.machinelearning.models.Schedule; +import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -public final class CodeContainerDataImpl - implements CodeContainerData, CodeContainerData.Definition, CodeContainerData.Update { - private CodeContainerDataInner innerObject; +public final class ScheduleImpl implements Schedule, Schedule.Definition, Schedule.Update { + private ScheduleInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; @@ -28,7 +27,7 @@ public String type() { return this.innerModel().type(); } - public CodeContainerDetails properties() { + public ScheduleProperties properties() { return this.innerModel().properties(); } @@ -40,7 +39,7 @@ public String resourceGroupName() { return resourceGroupName; } - public CodeContainerDataInner innerModel() { + public ScheduleInner innerModel() { return this.innerObject; } @@ -54,94 +53,88 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String name; - public CodeContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public ScheduleImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } - public CodeContainerData create() { + public Schedule create() { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getSchedules() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); return this; } - public CodeContainerData create(Context context) { + public Schedule create(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getSchedules() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); return this; } - CodeContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeContainerDataInner(); + ScheduleImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new ScheduleInner(); this.serviceManager = serviceManager; this.name = name; } - public CodeContainerDataImpl update() { + public ScheduleImpl update() { return this; } - public CodeContainerData apply() { + public Schedule apply() { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getSchedules() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); return this; } - public CodeContainerData apply(Context context) { + public Schedule apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getSchedules() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); return this; } - CodeContainerDataImpl( - CodeContainerDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + 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(), "codes"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "schedules"); } - public CodeContainerData refresh() { + public Schedule refresh() { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() + .getSchedules() .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) .getValue(); return this; } - public CodeContainerData refresh(Context context) { + public Schedule refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() + .getSchedules() .getWithResponse(resourceGroupName, workspaceName, name, context) .getValue(); return this; } - public CodeContainerDataImpl withProperties(CodeContainerDetails properties) { + 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 000000000000..d707dade35ae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java @@ -0,0 +1,1141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; +import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; +import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in SchedulesClient. */ +public final class SchedulesClientImpl implements SchedulesClient { + /** The proxy service used to perform REST calls. */ + private final SchedulesService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of SchedulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SchedulesClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy.create(SchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesSchedules 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, + @QueryParam("listViewType") ScheduleListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ScheduleInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String skip, ScheduleListViewType listViewType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String skip, + ScheduleListViewType listViewType, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skip, ScheduleListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final ScheduleListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String skip, + ScheduleListViewType listViewType, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final ScheduleListViewType listViewType = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); + } + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + ScheduleListViewType listViewType, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); + } + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String workspaceName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String workspaceName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { + return 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 URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java new file mode 100644 index 000000000000..62cee961df43 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; +import com.azure.resourcemanager.machinelearning.models.Schedule; +import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; +import com.azure.resourcemanager.machinelearning.models.Schedules; + +public final class SchedulesImpl implements Schedules { + private static final ClientLogger LOGGER = new ClientLogger(SchedulesImpl.class); + + private final SchedulesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public SchedulesImpl( + SchedulesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + ScheduleListViewType listViewType, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return Utils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); + } + + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, context); + } + + public 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/UsagesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java index f6c8c78e6a01..2d3d651492cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java @@ -36,21 +36,21 @@ public final class UsagesClientImpl implements UsagesClient { private final UsagesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of UsagesClientImpl. * * @param client the instance of the service client containing this operation class. */ - UsagesClientImpl(AzureMachineLearningWorkspacesImpl client) { + UsagesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesUsages to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesUsages to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") @@ -244,7 +244,8 @@ public PagedIterable list(String location, Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -280,7 +281,8 @@ private Mono> listNextSinglePageAsync(String nextLink) /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java index 039a42f6cb42..7c7b7b54eecb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java @@ -31,21 +31,21 @@ public final class VirtualMachineSizesClientImpl implements VirtualMachineSizesC private final VirtualMachineSizesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of VirtualMachineSizesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachineSizesClientImpl(AzureMachineLearningWorkspacesImpl client) { + VirtualMachineSizesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(VirtualMachineSizesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesVirtualMachineSizes to be used by the + * The interface defining all the services for AzureMachineLearningServicesVirtualMachineSizes to be used by the * proxy service to perform REST calls. */ @Host("{$host}") 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 168d77946ab1..9ff113b0e7ac 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 3f1740d50c1e..57e362e41cd1 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. */ @@ -39,14 +39,14 @@ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnection private final WorkspaceConnectionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspaceConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspaceConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspaceConnectionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy .create(WorkspaceConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); @@ -54,53 +54,52 @@ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnection } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceConnections to be used by the + * The interface defining all the services for AzureMachineLearningServicesWorkspaceConnections to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") private interface WorkspaceConnectionsService { @Headers({"Content-Type: application/json"}) - @Get( + @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,200 @@ 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 URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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 URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java index 323c6294b790..369777b1f7c0 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/WorkspaceFeaturesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java index 4dd4cc101c36..8217ff04551b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java @@ -36,22 +36,22 @@ public final class WorkspaceFeaturesClientImpl implements WorkspaceFeaturesClien private final WorkspaceFeaturesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspaceFeaturesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspaceFeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspaceFeaturesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(WorkspaceFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceFeatures to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesWorkspaceFeatures to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") @@ -264,7 +264,8 @@ public PagedIterable list(String resourceGroupName, String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -300,7 +301,8 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. 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 c9a699fc48b0..96ae21b67b5b 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 047fce75bcc7..67f583f1a635 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/implementation/WorkspacesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java index 908deea49f7c..8984217f5b60 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java @@ -55,21 +55,21 @@ public final class WorkspacesClientImpl implements WorkspacesClient { private final WorkspacesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspacesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspacesClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspacesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaces to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesWorkspaces to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -3083,7 +3083,8 @@ public Response listOutboundNetworkDependenciesEndpoi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3120,7 +3121,8 @@ private Mono> listByResourceGroupNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3158,7 +3160,8 @@ private Mono> listByResourceGroupNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3195,7 +3198,8 @@ private Mono> listBySubscriptionNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java index d69c58716f98..4d32798ab03b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for AzureMachineLearningWorkspaces. These APIs allow end users to operate on + * Package containing the implementations for AzureMachineLearningServices. These APIs allow end users to operate on * Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java new file mode 100644 index 000000000000..ad3075a6a8a3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 AccessKeyAuthTypeWorkspaceConnectionProperties model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("AccessKey") +@Fluent +public final class AccessKeyAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionAccessKey credentials; + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionAccessKey credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the AccessKeyAuthTypeWorkspaceConnectionProperties object itself. + */ + public AccessKeyAuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConnectionAccessKey credentials) { + this.credentials = credentials; + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withCategory(String category) { + super.withCategory(category); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withValue(String value) { + super.withValue(value); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { + super.withValueFormat(valueFormat); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java new file mode 100644 index 000000000000..4c187cc0c997 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details of ACR account to be used for the Registry. */ +@Fluent +public final class AcrDetails { + /* + * The systemCreatedAcrAccount property. + */ + @JsonProperty(value = "systemCreatedAcrAccount") + private SystemCreatedAcrAccount systemCreatedAcrAccount; + + /* + * The userCreatedAcrAccount property. + */ + @JsonProperty(value = "userCreatedAcrAccount") + private UserCreatedAcrAccount userCreatedAcrAccount; + + /** + * Get the systemCreatedAcrAccount property: The systemCreatedAcrAccount property. + * + * @return the systemCreatedAcrAccount value. + */ + public SystemCreatedAcrAccount systemCreatedAcrAccount() { + return this.systemCreatedAcrAccount; + } + + /** + * Set the systemCreatedAcrAccount property: The systemCreatedAcrAccount property. + * + * @param systemCreatedAcrAccount the systemCreatedAcrAccount value to set. + * @return the AcrDetails object itself. + */ + public AcrDetails withSystemCreatedAcrAccount(SystemCreatedAcrAccount systemCreatedAcrAccount) { + this.systemCreatedAcrAccount = systemCreatedAcrAccount; + return this; + } + + /** + * Get the userCreatedAcrAccount property: The userCreatedAcrAccount property. + * + * @return the userCreatedAcrAccount value. + */ + public UserCreatedAcrAccount userCreatedAcrAccount() { + return this.userCreatedAcrAccount; + } + + /** + * Set the userCreatedAcrAccount property: The userCreatedAcrAccount property. + * + * @param userCreatedAcrAccount the userCreatedAcrAccount value to set. + * @return the AcrDetails object itself. + */ + public AcrDetails withUserCreatedAcrAccount(UserCreatedAcrAccount userCreatedAcrAccount) { + this.userCreatedAcrAccount = userCreatedAcrAccount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (systemCreatedAcrAccount() != null) { + systemCreatedAcrAccount().validate(); + } + if (userCreatedAcrAccount() != null) { + userCreatedAcrAccount().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java index 2629a6c4daa6..5f5c42e5a698 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java @@ -54,13 +54,6 @@ public Aks withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public Aks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * 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 3ab840570750..e9c0809a5fd5 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 662ce009c4eb..6c974bd848cd 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 70eb655f389b..eb86f365cc25 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/PartialManagedOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java similarity index 75% 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/AllNodes.java index a44f5303a123..d8353e7f4d87 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/AllNodes.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") +/** All nodes means the service will be running on all of the nodes of the job. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "nodesValueType") +@JsonTypeName("All") @Immutable -public final class PartialManagedOnlineDeployment extends PartialOnlineDeployment { +public final class AllNodes extends Nodes { /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java index 7ba480b00fbd..10669ff24bde 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java @@ -8,7 +8,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AllocationState. */ +/** + * Allocation state. + * + *

Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There + * are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is + * created and when no operations are being performed on the compute to change the number of compute nodes. resizing - + * Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. + */ public final class AllocationState extends ExpandableStringEnum { /** Static value Steady for AllocationState. */ public static final AllocationState STEADY = fromString("Steady"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java index 94131bfbba3d..77f0146841f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java @@ -54,13 +54,6 @@ public AmlCompute withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public AmlCompute withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * 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 e01ce2e59447..5a00f22375a7 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 ae9c7b6f2014..70e82e64b6d6 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 13b9c458027b..1aeb5cf522a7 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,14 +13,13 @@ @Fluent public final class AmlOperationListResult { /* - * List of AML workspace operations supported by the AML workspace resource - * provider. + * List of AML operations supported by the AML resource provider. */ @JsonProperty(value = "value") private List value; /** - * Get the value property: List of AML workspace operations supported by the AML workspace resource provider. + * Get the value property: List of AML operations supported by the AML resource provider. * * @return the value value. */ @@ -29,7 +28,7 @@ public List value() { } /** - * Set the value property: List of AML workspace operations supported by the AML workspace resource provider. + * Set the value property: List of AML operations supported by the AML resource provider. * * @param value the value value to set. * @return the AmlOperationListResult object itself. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java index 176121795a76..15b8326ef1c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java @@ -8,7 +8,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ApplicationSharingPolicy. */ +/** + * Sharing policy for applications on this compute instance + * + *

Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the + * creator can access applications on this compute instance. When Shared, any workspace user can access applications on + * this instance depending on his/her assigned role. + */ public final class ApplicationSharingPolicy extends ExpandableStringEnum { /** Static value Personal for ApplicationSharingPolicy. */ public static final ApplicationSharingPolicy PERSONAL = fromString("Personal"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java new file mode 100644 index 000000000000..fab4ea13ee3c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ARM ResourceId of a resource. */ +@Fluent +public final class ArmResourceId { + /* + * Arm ResourceId is in the format + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts" + + "/{StorageAccountName}" + * or + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry" + + "/registries/{AcrName}" + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get the resourceId property: Arm ResourceId is in the format + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts" + + "/{StorageAccountName}" + * or + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry" + + "/registries/{AcrName}". + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Arm ResourceId is in the format + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts" + + "/{StorageAccountName}" + * or + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry" + + "/registries/{AcrName}". + * + * @param resourceId the resourceId value to set. + * @return the ArmResourceId object itself. + */ + public ArmResourceId withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java new file mode 100644 index 000000000000..ef142945c474 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.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; + +/** Provisioning state of registry asset. */ +public final class AssetProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for AssetProvisioningState. */ + public static final AssetProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for AssetProvisioningState. */ + public static final AssetProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for AssetProvisioningState. */ + public static final AssetProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Creating for AssetProvisioningState. */ + public static final AssetProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for AssetProvisioningState. */ + public static final AssetProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for AssetProvisioningState. */ + public static final AssetProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates or finds a AssetProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AssetProvisioningState. + */ + @JsonCreator + public static AssetProvisioningState fromString(String name) { + return fromString(name, AssetProvisioningState.class); + } + + /** + * Gets known AssetProvisioningState values. + * + * @return known AssetProvisioningState values. + */ + public static Collection values() { + return values(AssetProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java index f4f8de510ede..93a216ff0144 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 816c0b483a09..b3748dc49368 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/AutologgerSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutologgerSettings.java new file mode 100644 index 000000000000..75e15e853597 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutologgerSettings.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; + +/** Settings for Autologger. */ +@Fluent +public final class AutologgerSettings { + /* + * [Required] Indicates whether mlflow autologger is enabled. + */ + @JsonProperty(value = "mlflowAutologger", required = true) + private MLFlowAutologgerState mlflowAutologger; + + /** + * Get the mlflowAutologger property: [Required] Indicates whether mlflow autologger is enabled. + * + * @return the mlflowAutologger value. + */ + public MLFlowAutologgerState mlflowAutologger() { + return this.mlflowAutologger; + } + + /** + * Set the mlflowAutologger property: [Required] Indicates whether mlflow autologger is enabled. + * + * @param mlflowAutologger the mlflowAutologger value to set. + * @return the AutologgerSettings object itself. + */ + public AutologgerSettings withMlflowAutologger(MLFlowAutologgerState mlflowAutologger) { + this.mlflowAutologger = mlflowAutologger; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mlflowAutologger() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property mlflowAutologger in model AutologgerSettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutologgerSettings.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java index 2164a91fb63e..cfe1adfc61b3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Autosave. */ +/** Auto save settings. */ public final class Autosave extends ExpandableStringEnum { /** Static value None for Autosave. */ public static final Autosave NONE = fromString("None"); 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 3b33d6574d4e..f6c91b3e6596 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 a22c78a502e9..60c1d75e1d10 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 c1952e55d9b1..fd7eaa61a058 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 000000000000..47ab089383f5 --- /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 2c7d422adc32..bc9fdb101867 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/BatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java new file mode 100644 index 000000000000..ff78009e7cdf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; +import java.util.Map; + +/** An immutable client-side representation of BatchDeployment. */ +public interface BatchDeployment { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + BatchDeploymentProperties properties(); + + /** + * Gets the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + Sku sku(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner object. + * + * @return the inner object. + */ + BatchDeploymentInner innerModel(); + + /** The entirety of the BatchDeployment definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The BatchDeployment definition stages. */ + interface DefinitionStages { + /** The first stage of the BatchDeployment definition. */ + interface Blank extends WithLocation { + } + /** The stage of the BatchDeployment definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + /** The stage of the BatchDeployment definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, endpointName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param endpointName Inference endpoint name. + * @return the next definition stage. + */ + WithProperties withExistingBatchEndpoint( + String resourceGroupName, String workspaceName, String endpointName); + } + /** The stage of the BatchDeployment definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(BatchDeploymentProperties properties); + } + /** + * The stage of the BatchDeployment definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithIdentity, + DefinitionStages.WithKind, + DefinitionStages.WithSku { + /** + * Executes the create request. + * + * @return the created resource. + */ + BatchDeployment create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BatchDeployment create(Context context); + } + /** The stage of the BatchDeployment definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the BatchDeployment definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). + * + * @param identity Managed service identity (system assigned and/or user assigned identities). + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + /** The stage of the BatchDeployment definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. + * + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the BatchDeployment definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } + } + /** + * Begins update for the BatchDeployment resource. + * + * @return the stage of resource update. + */ + BatchDeployment.Update update(); + + /** The template for BatchDeployment update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BatchDeployment apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BatchDeployment apply(Context context); + } + /** The BatchDeployment update stages. */ + interface UpdateStages { + /** The stage of the BatchDeployment update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the BatchDeployment update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(PartialBatchDeployment properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BatchDeployment refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BatchDeployment refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/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 210a7bc11f9d..e77dbadc204e 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 9f22d39168a3..b6a71a5ea6d1 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 be41a5214429..3002176d89c2 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 08a9d25e3095..e7d017d86e8b 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 21209aca29dd..4a19a76ee172 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 f92ee169cc38..c94526368b7a 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 17a0ff64a08a..2e6a13a83ad5 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 8e4c962dbe78..3c1729b22a47 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/BatchLoggingLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java index ec83803d333b..0b8e9b5c717d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BatchLoggingLevel. */ +/** + * Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and Debug. The default + * value is Info. + */ public final class BatchLoggingLevel extends ExpandableStringEnum { /** Static value Info for BatchLoggingLevel. */ public static final BatchLoggingLevel INFO = fromString("Info"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java index 710dfa816d47..b3b8a404129a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BatchOutputAction. */ +/** Enum to determine how batch inferencing will handle output. */ public final class BatchOutputAction extends ExpandableStringEnum { /** Static value SummaryOnly for BatchOutputAction. */ public static final BatchOutputAction SUMMARY_ONLY = fromString("SummaryOnly"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java index f91f3093edac..e6ac33b4d77e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BillingCurrency. */ +/** + * Billing currency + * + *

Three lettered code specifying the currency of the VM price. Example: USD. + */ public final class BillingCurrency extends ExpandableStringEnum { /** Static value USD for BillingCurrency. */ public static final BillingCurrency USD = fromString("USD"); 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 000000000000..27360a9645f7 --- /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 000000000000..3a684f51cd53 --- /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; + +/** Enum for all classification models supported by AutoML. */ +public final class BlockedTransformers extends ExpandableStringEnum { + /** Static value TextTargetEncoder for BlockedTransformers. */ + public static final BlockedTransformers TEXT_TARGET_ENCODER = fromString("TextTargetEncoder"); + + /** Static value OneHotEncoder for BlockedTransformers. */ + public static final BlockedTransformers ONE_HOT_ENCODER = fromString("OneHotEncoder"); + + /** Static value CatTargetEncoder for BlockedTransformers. */ + public static final BlockedTransformers CAT_TARGET_ENCODER = fromString("CatTargetEncoder"); + + /** Static value TfIdf for BlockedTransformers. */ + public static final BlockedTransformers TF_IDF = fromString("TfIdf"); + + /** Static value WoETargetEncoder for BlockedTransformers. */ + public static final BlockedTransformers WO_ETARGET_ENCODER = fromString("WoETargetEncoder"); + + /** Static value LabelEncoder for BlockedTransformers. */ + public static final BlockedTransformers LABEL_ENCODER = fromString("LabelEncoder"); + + /** Static value WordEmbedding for BlockedTransformers. */ + public static final BlockedTransformers WORD_EMBEDDING = fromString("WordEmbedding"); + + /** Static value NaiveBayes for BlockedTransformers. */ + public static final BlockedTransformers NAIVE_BAYES = fromString("NaiveBayes"); + + /** Static value CountVectorizer for BlockedTransformers. */ + public static final BlockedTransformers COUNT_VECTORIZER = fromString("CountVectorizer"); + + /** Static value HashOneHotEncoder for BlockedTransformers. */ + public static final BlockedTransformers HASH_ONE_HOT_ENCODER = fromString("HashOneHotEncoder"); + + /** + * Creates 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 480d894d3433..149be7d85b2d 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/Caching.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java index b39408947e2f..7158140faa82 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Caching. */ +/** Caching type of Data Disk. */ public final class Caching extends ExpandableStringEnum { /** Static value None for Caching. */ public static final Caching NONE = fromString("None"); 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 444af27aa8ca..6f033b33ad27 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 = "trainingSettings") + private ClassificationTrainingSettings trainingSettings; + + /* + * Columns to use for CVSplit data. */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; + @JsonProperty(value = "cvSplitColumnNames") + private List cvSplitColumnNames; /* * Featurization inputs needed for AutoML job. @@ -45,6 +45,12 @@ public final class Classification extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private TableVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private TableFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @@ -52,48 +58,76 @@ 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. + /* + * Search space for sampling different combinations of models and their hyperparameters. */ - public List allowedModels() { - return this.allowedModels; - } + @JsonProperty(value = "searchSpace") + private List searchSpace; - /** - * Set the allowedModels property: Allowed models for classification task. - * - * @param allowedModels the allowedModels value to set. - * @return the Classification object itself. + /* + * Settings for model sweeping and hyperparameter tuning. */ - public Classification withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } + @JsonProperty(value = "sweepSettings") + private TableSweepSettings sweepSettings; + + /* + * 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 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 +152,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 withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; + public Classification withTrainingSettings(ClassificationTrainingSettings trainingSettings) { + this.trainingSettings = trainingSettings; + return this; + } + + /** + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * + * @return the cvSplitColumnNames value. + */ + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; + } + + /** + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * + * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @return the Classification object itself. + */ + public Classification withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; return this; } @@ -157,6 +211,26 @@ public Classification withFeaturizationSettings(TableVerticalFeaturizationSettin return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public TableFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the Classification object itself. + */ + public Classification withFixedParameters(TableFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. * @@ -178,22 +252,172 @@ 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 searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the Classification object itself. + */ + public Classification withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public TableSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the Classification object itself. + */ + public Classification withSweepSettings(TableSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + 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 +428,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,17 +450,32 @@ 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(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } - if (trainingSettings() != null) { - trainingSettings().validate(); + if (nCrossValidations() != null) { + nCrossValidations().validate(); + } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } + if (testData() != null) { + testData().validate(); + } + if (validationData() != null) { + validationData().validate(); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java index ae45624e07f8..b95e54596d5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClassificationModels. */ +/** Enum for all classification models supported by AutoML. */ public final class ClassificationModels extends ExpandableStringEnum { /** Static value LogisticRegression for ClassificationModels. */ public static final ClassificationModels LOGISTIC_REGRESSION = fromString("LogisticRegression"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java index 32fe7a12c056..8a547a35a93e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClassificationMultilabelPrimaryMetrics. */ +/** Primary metrics for classification multilabel tasks. */ public final class ClassificationMultilabelPrimaryMetrics extends ExpandableStringEnum { /** Static value AUCWeighted for ClassificationMultilabelPrimaryMetrics. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java index 1e20e6e6853a..eeb68a2d99a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClassificationPrimaryMetrics. */ +/** Primary metrics for classification tasks. */ public final class ClassificationPrimaryMetrics extends ExpandableStringEnum { /** Static value AUCWeighted for ClassificationPrimaryMetrics. */ public static final ClassificationPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); 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 000000000000..c447b968c8a2 --- /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/ClusterPurpose.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java index 34a85929d73a..d5efb82e24ee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClusterPurpose. */ +/** Intended usage of the cluster. */ public final class ClusterPurpose extends ExpandableStringEnum { /** Static value FastProd for ClusterPurpose. */ public static final ClusterPurpose FAST_PROD = fromString("FastProd"); 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 000000000000..f885a7f09fbc --- /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/CodeContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java new file mode 100644 index 000000000000..e5c1ddcfb562 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.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.CodeContainerInner; + +/** An immutable client-side representation of CodeContainer. */ +public interface CodeContainer { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + CodeContainerProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner object. + * + * @return the inner object. + */ + CodeContainerInner innerModel(); + + /** The entirety of the CodeContainer definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The CodeContainer definition stages. */ + interface DefinitionStages { + /** The first stage of the CodeContainer definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the CodeContainer definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @return the next definition stage. + */ + WithProperties withExistingRegistry(String resourceGroupName, String registryName); + } + /** The stage of the CodeContainer definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(CodeContainerProperties properties); + } + /** + * The stage of the CodeContainer definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate { + /** + * Executes the create request. + * + * @return the created resource. + */ + CodeContainer create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CodeContainer create(Context context); + } + } + /** + * Begins update for the CodeContainer resource. + * + * @return the stage of resource update. + */ + CodeContainer.Update update(); + + /** The template for CodeContainer update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CodeContainer apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CodeContainer apply(Context context); + } + /** The CodeContainer update stages. */ + interface UpdateStages { + /** The stage of the CodeContainer update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(CodeContainerProperties properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CodeContainer refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CodeContainer refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java new file mode 100644 index 000000000000..c25981fc54dd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + +/** Container for code asset versions. */ +@Fluent +public final class CodeContainerProperties extends AssetContainer { + /* + * Provisioning state for the code container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /** + * Get the provisioningState property: Provisioning state for the code container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@inheritDoc} */ + @Override + public CodeContainerProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public CodeContainerProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public CodeContainerProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public CodeContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java index 083dc6e2162d..e01333f91895 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 28853ffc3b5f..70c902583fb1 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 @@ -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 com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; /** Resource collection API of CodeContainers. */ public interface CodeContainers { @@ -20,7 +21,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 +35,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 +74,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,59 +88,36 @@ 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); /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - CodeContainerData getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ - void deleteById(String id); + CodeContainer createOrUpdate(String resourceGroupName, String workspaceName, String name, CodeContainerInner body); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CodeContainerData resource. - * - * @param name resource name. - * @return the first stage of the new CodeContainerData definition. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - CodeContainerData.DefinitionStages.Blank define(String name); + 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/models/CodeVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java similarity index 69% 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 b58a35225546..b221f6e6ece2 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,37 +53,37 @@ 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. + * Specifies resourceGroupName, registryName, codeName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. * @return the next definition stage. */ - WithProperties withExistingCode(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingCode(String resourceGroupName, String registryName, String codeName); } - /** 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 61% 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 fe0770db7dee..c6510dc57b84 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,13 +10,19 @@ /** Code asset version details. */ @Fluent -public final class CodeVersionDetails extends AssetBase { +public final class CodeVersionProperties extends AssetBase { /* * Uri where code is located */ @JsonProperty(value = "codeUri") private String codeUri; + /* + * Provisioning state for the code version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** * Get the codeUri property: Uri where code is located. * @@ -30,44 +36,53 @@ 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; } + /** + * Get the provisioningState property: Provisioning state for the code version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@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 9b0d2f605dd2..968079efcde1 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 355560505801..cc8f8c99a7d0 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 @@ -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 com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; /** Resource collection API of CodeVersions. */ public interface CodeVersions { @@ -21,7 +22,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 +39,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 +89,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,59 +104,44 @@ 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); /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - CodeVersionData getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ - void deleteById(String id); + CodeVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body); /** - * Delete version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CodeVersionData resource. - * - * @param name resource name. - * @return the first stage of the new CodeVersionData definition. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - CodeVersionData.DefinitionStages.Blank define(String name); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + CodeVersionInner body, + Context context); } 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 5c42daaa81e7..83974491b019 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,13 @@ @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 { + /* + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + */ + @JsonProperty(value = "autologgerSettings") + private AutologgerSettings autologgerSettings; + /* * ARM resource ID of the code asset. */ @@ -24,22 +30,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 +84,29 @@ public final class CommandJob extends JobBaseDetails { * Compute Resource configuration for the job. */ @JsonProperty(value = "resources") - private ResourceConfiguration resources; + private JobResourceConfiguration resources; + + /** + * Get the autologgerSettings property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. + * + * @return the autologgerSettings value. + */ + public AutologgerSettings autologgerSettings() { + return this.autologgerSettings; + } + + /** + * Set the autologgerSettings property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. + * + * @param autologgerSettings the autologgerSettings value to set. + * @return the CommandJob object itself. + */ + public CommandJob withAutologgerSettings(AutologgerSettings autologgerSettings) { + this.autologgerSettings = autologgerSettings; + return this; + } /** * Get the codeId property: ARM resource ID of the code asset. @@ -259,7 +284,7 @@ public Object parameters() { * * @return the resources value. */ - public ResourceConfiguration resources() { + public JobResourceConfiguration resources() { return this.resources; } @@ -269,11 +294,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 +341,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) { @@ -352,6 +377,9 @@ public CommandJob withTags(Map tags) { @Override public void validate() { super.validate(); + if (autologgerSettings() != null) { + autologgerSettings().validate(); + } if (command() == null) { throw LOGGER .logExceptionAsError( 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 70% 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 abc45b75dc2c..54141e0594ac 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,36 +53,36 @@ 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. + * Specifies resourceGroupName, registryName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param registryName Name of Azure Machine Learning registry. * @return the next definition stage. */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + WithProperties withExistingRegistry(String resourceGroupName, String registryName); } - /** 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/ComponentContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerData.java deleted file mode 100644 index 348d61274d19..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerData.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; - -/** An immutable client-side representation of ComponentContainerData. */ -public interface ComponentContainerData { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ComponentContainerDetails properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner object. - * - * @return the inner object. - */ - ComponentContainerDataInner innerModel(); - - /** The entirety of the ComponentContainerData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ComponentContainerData definition stages. */ - interface DefinitionStages { - /** The first stage of the ComponentContainerData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ComponentContainerData definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the ComponentContainerData definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ComponentContainerDetails properties); - } - /** - * The stage of the ComponentContainerData definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - ComponentContainerData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComponentContainerData create(Context context); - } - } - /** - * Begins update for the ComponentContainerData resource. - * - * @return the stage of resource update. - */ - ComponentContainerData.Update update(); - - /** The template for ComponentContainerData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComponentContainerData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComponentContainerData apply(Context context); - } - /** The ComponentContainerData update stages. */ - interface UpdateStages { - /** The stage of the ComponentContainerData update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ComponentContainerDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComponentContainerData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComponentContainerData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java similarity index 53% 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 194613dc4553..d61da7978567 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** @@ -12,31 +13,46 @@ * 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 { + /* + * Provisioning state for the component container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /** + * Get the provisioningState property: Provisioning state for the component container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@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 728f0888c6d4..0dc316652454 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 a282817936b5..80d9fe39b2c6 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 @@ -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 com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; /** Resource collection API of ComponentContainers. */ public interface ComponentContainers { @@ -20,7 +21,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 +36,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 +76,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,59 +90,37 @@ 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); /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - ComponentContainerData getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ - void deleteById(String id); + ComponentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComponentContainerData resource. - * - * @param name resource name. - * @return the first stage of the new ComponentContainerData definition. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - ComponentContainerData.DefinitionStages.Blank define(String name); + 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/models/ModelVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java similarity index 70% 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/ComponentVersion.java index 8b3a0b2871a1..450c6320f1ff 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/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.ModelVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -/** An immutable client-side representation of ModelVersionData. */ -public interface ModelVersionData { +/** 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 ModelVersionData { * * @return the properties value. */ - ModelVersionDetails properties(); + ComponentVersionProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,37 +53,37 @@ 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.ComponentVersionInner object. * * @return the inner object. */ - ModelVersionDataInner innerModel(); + ComponentVersionInner innerModel(); - /** The entirety of the ModelVersionData definition. */ + /** The entirety of the ComponentVersion definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ModelVersionData definition stages. */ + /** The ComponentVersion definition stages. */ interface DefinitionStages { - /** The first stage of the ModelVersionData definition. */ + /** The first stage of the ComponentVersion definition. */ interface Blank extends WithParentResource { } - /** The stage of the ModelVersionData definition allowing to specify parent resource. */ + /** The stage of the ComponentVersion definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName, name. + * Specifies resourceGroupName, registryName, componentName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. * @return the next definition stage. */ - WithProperties withExistingModel(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingComponent(String resourceGroupName, String registryName, String componentName); } - /** The stage of the ModelVersionData 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(ModelVersionDetails properties); + WithCreate withProperties(ComponentVersionProperties properties); } /** - * The stage of the ModelVersionData 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. */ - ModelVersionData 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. */ - ModelVersionData create(Context context); + ComponentVersion create(Context context); } } /** - * Begins update for the ModelVersionData resource. + * Begins update for the ComponentVersion resource. * * @return the stage of resource update. */ - ModelVersionData.Update update(); + ComponentVersion.Update update(); - /** The template for ModelVersionData update. */ + /** The template for ComponentVersion update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - ModelVersionData 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. */ - ModelVersionData apply(Context context); + ComponentVersion apply(Context context); } - /** The ModelVersionData update stages. */ + /** The ComponentVersion update stages. */ interface UpdateStages { - /** The stage of the ModelVersionData 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(ModelVersionDetails properties); + Update withProperties(ComponentVersionProperties properties); } } /** @@ -156,7 +156,7 @@ interface WithProperties { * * @return the refreshed resource. */ - ModelVersionData 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. */ - ModelVersionData 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 62% 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 83c949438018..b3f4317c5349 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,16 +10,20 @@ /** 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; + /* + * Provisioning state for the component version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** * Get the componentSpec property: Defines Component definition details. <see * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. @@ -35,44 +39,53 @@ 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; } + /** + * Get the provisioningState property: Provisioning state for the component version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@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 58cc3eb90ab4..0c78c819fb8a 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 0778a179a33b..49c5e4a74ed8 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 @@ -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 com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; /** Resource collection API of ComponentVersions. */ public interface ComponentVersions { @@ -21,7 +22,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 +40,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 +91,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,59 +106,44 @@ 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); /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - ComponentVersionData getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ - void deleteById(String id); + ComponentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body); /** - * Delete version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComponentVersionData resource. - * - * @param name resource name. - * @return the first stage of the new ComponentVersionData definition. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - ComponentVersionData.DefinitionStages.Blank define(String name); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ComponentVersionInner body, + Context context); } 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 ad954b0114c7..516304b33bf8 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,17 +77,16 @@ 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") + @JsonProperty(value = "disableLocalAuth", access = JsonProperty.Access.WRITE_ONLY) private Boolean disableLocalAuth; /** @@ -106,7 +104,7 @@ public String computeLocation() { * * @return the provisioningState value. */ - public ProvisioningState provisioningState() { + public ComputeProvisioningState provisioningState() { return this.provisioningState; } @@ -197,18 +195,6 @@ public Boolean disableLocalAuth() { return this.disableLocalAuth; } - /** - * Set the disableLocalAuth property: Opt-out of local authentication and ensure customers can use only MSI and AAD - * exclusively for authentication. - * - * @param disableLocalAuth the disableLocalAuth value to set. - * @return the Compute object itself. - */ - public Compute withDisableLocalAuth(Boolean disableLocalAuth) { - this.disableLocalAuth = disableLocalAuth; - return this; - } - /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java index 3e55284c7909..4a8cf15ba0b7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java @@ -54,13 +54,6 @@ public ComputeInstance withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public ComputeInstance withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java index c3b2025c94cd..63c29c3a2eaf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ComputeInstanceAuthorizationType. */ +/** + * Compute Instance Authorization type. + * + *

The Compute Instance Authorization type. Available values are personal (default). + */ public final class ComputeInstanceAuthorizationType extends ExpandableStringEnum { /** Static value personal for ComputeInstanceAuthorizationType. */ public static final ComputeInstanceAuthorizationType PERSONAL = fromString("personal"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java new file mode 100644 index 000000000000..1e81e735aa5d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.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; + +/** Specifies settings for autologger. */ +@Fluent +public final class ComputeInstanceAutologgerSettings { + /* + * Indicates whether mlflow autologger is enabled for notebooks. + */ + @JsonProperty(value = "mlflowAutologger") + private MlflowAutologger mlflowAutologger; + + /** + * Get the mlflowAutologger property: Indicates whether mlflow autologger is enabled for notebooks. + * + * @return the mlflowAutologger value. + */ + public MlflowAutologger mlflowAutologger() { + return this.mlflowAutologger; + } + + /** + * Set the mlflowAutologger property: Indicates whether mlflow autologger is enabled for notebooks. + * + * @param mlflowAutologger the mlflowAutologger value to set. + * @return the ComputeInstanceAutologgerSettings object itself. + */ + public ComputeInstanceAutologgerSettings withMlflowAutologger(MlflowAutologger mlflowAutologger) { + this.mlflowAutologger = mlflowAutologger; + 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/ComputeInstanceConnectivityEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java index 3ed3353f6e7b..6dc1f4a4fe3c 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 2a51e2588b51..58952e583d44 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 5620dcfe0733..235aa502269a 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 3b554e6403b2..af01a3b54224 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,21 +25,39 @@ 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") private ApplicationSharingPolicy applicationSharingPolicy; + /* + * Specifies settings for autologger. + */ + @JsonProperty(value = "autologgerSettings") + private ComputeInstanceAutologgerSettings autologgerSettings; + /* * Specifies policy and settings for SSH access. */ @JsonProperty(value = "sshSettings") private ComputeInstanceSshSettings sshSettings; + /* + * List of Custom Services added to the compute. + */ + @JsonProperty(value = "customServices") + private List customServices; + + /* + * Returns metadata about the operating system image for this compute instance. + */ + @JsonProperty(value = "osImageMetadata", access = JsonProperty.Access.WRITE_ONLY) + private ImageMetadata osImageMetadata; + /* * Describes all connectivity endpoints available for this ComputeInstance. */ @@ -47,8 +65,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 +77,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 +91,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 +123,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 +204,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 +217,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. @@ -202,6 +231,26 @@ public ComputeInstanceProperties withApplicationSharingPolicy(ApplicationSharing return this; } + /** + * Get the autologgerSettings property: Specifies settings for autologger. + * + * @return the autologgerSettings value. + */ + public ComputeInstanceAutologgerSettings autologgerSettings() { + return this.autologgerSettings; + } + + /** + * Set the autologgerSettings property: Specifies settings for autologger. + * + * @param autologgerSettings the autologgerSettings value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withAutologgerSettings(ComputeInstanceAutologgerSettings autologgerSettings) { + this.autologgerSettings = autologgerSettings; + return this; + } + /** * Get the sshSettings property: Specifies policy and settings for SSH access. * @@ -222,6 +271,35 @@ 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 osImageMetadata property: Returns metadata about the operating system image for this compute instance. + * + * @return the osImageMetadata value. + */ + public ImageMetadata osImageMetadata() { + return this.osImageMetadata; + } + /** * Get the connectivityEndpoints property: Describes all connectivity endpoints available for this ComputeInstance. * @@ -250,7 +328,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 +348,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 +359,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 +432,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 +467,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. @@ -418,9 +526,18 @@ public void validate() { if (subnet() != null) { subnet().validate(); } + if (autologgerSettings() != null) { + autologgerSettings().validate(); + } if (sshSettings() != null) { sshSettings().validate(); } + if (customServices() != null) { + customServices().forEach(e -> e.validate()); + } + if (osImageMetadata() != null) { + osImageMetadata().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 1ccf20d6d7f1..9d65f8e36a2e 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/ComputeInstanceState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java index 7f6ead983304..a2c488852c52 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ComputeInstanceState. */ +/** Current state of an ComputeInstance. */ public final class ComputeInstanceState extends ExpandableStringEnum { /** Static value Creating for ComputeInstanceState. */ public static final ComputeInstanceState CREATING = fromString("Creating"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java index 9a604c36dc44..b94f5dd77294 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ComputePowerAction. */ +/** [Required] The compute power action. */ public final class ComputePowerAction extends ExpandableStringEnum { /** Static value Start for ComputePowerAction. */ public static final ComputePowerAction START = fromString("Start"); 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 000000000000..992c9e695c46 --- /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; + +/** The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. */ +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 f83d48f467a0..90b6ebb425e2 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 a0e3d4b8ecec..b805a194d435 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 @@ -11,7 +11,7 @@ @Fluent public final class ComputeStartStopSchedule { /* - * Schedule id. + * A system assigned id for the schedule. */ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; @@ -23,19 +23,43 @@ public final class ComputeStartStopSchedule { private ProvisioningStatus provisioningStatus; /* - * The compute power action. + * Is the schedule enabled or disabled? + */ + @JsonProperty(value = "status") + private ScheduleStatus status; + + /* + * [Required] The compute power action. */ @JsonProperty(value = "action") private ComputePowerAction action; /* - * Base definition of a schedule + * The triggerType property. + */ + @JsonProperty(value = "triggerType") + private TriggerType triggerType; + + /* + * The workflow trigger recurrence for ComputeStartStop schedule type. + */ + @JsonProperty(value = "recurrence") + private Recurrence recurrence; + + /* + * The workflow trigger cron for ComputeStartStop schedule type. + */ + @JsonProperty(value = "cron") + private Cron cron; + + /* + * [Deprecated] Not used any more. */ @JsonProperty(value = "schedule") private ScheduleBase schedule; /** - * Get the id property: Schedule id. + * Get the id property: A system assigned id for the schedule. * * @return the id value. */ @@ -53,7 +77,27 @@ public ProvisioningStatus provisioningStatus() { } /** - * Get the action property: The compute power action. + * Get the status property: Is the schedule enabled or disabled?. + * + * @return the status value. + */ + public ScheduleStatus status() { + return this.status; + } + + /** + * Set the status property: Is the schedule enabled or disabled?. + * + * @param status the status value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withStatus(ScheduleStatus status) { + this.status = status; + return this; + } + + /** + * Get the action property: [Required] The compute power action. * * @return the action value. */ @@ -62,7 +106,7 @@ public ComputePowerAction action() { } /** - * Set the action property: The compute power action. + * Set the action property: [Required] The compute power action. * * @param action the action value to set. * @return the ComputeStartStopSchedule object itself. @@ -73,7 +117,67 @@ public ComputeStartStopSchedule withAction(ComputePowerAction action) { } /** - * Get the schedule property: Base definition of a schedule. + * Get the triggerType property: The triggerType property. + * + * @return the triggerType value. + */ + public TriggerType triggerType() { + return this.triggerType; + } + + /** + * Set the triggerType property: The triggerType property. + * + * @param triggerType the triggerType value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withTriggerType(TriggerType triggerType) { + this.triggerType = triggerType; + return this; + } + + /** + * Get the recurrence property: The workflow trigger recurrence for ComputeStartStop schedule type. + * + * @return the recurrence value. + */ + public Recurrence recurrence() { + return this.recurrence; + } + + /** + * Set the recurrence property: The workflow trigger recurrence for ComputeStartStop schedule type. + * + * @param recurrence the recurrence value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withRecurrence(Recurrence recurrence) { + this.recurrence = recurrence; + return this; + } + + /** + * Get the cron property: The workflow trigger cron for ComputeStartStop schedule type. + * + * @return the cron value. + */ + public Cron cron() { + return this.cron; + } + + /** + * Set the cron property: The workflow trigger cron for ComputeStartStop schedule type. + * + * @param cron the cron value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withCron(Cron cron) { + this.cron = cron; + return this; + } + + /** + * Get the schedule property: [Deprecated] Not used any more. * * @return the schedule value. */ @@ -82,7 +186,7 @@ public ScheduleBase schedule() { } /** - * Set the schedule property: Base definition of a schedule. + * Set the schedule property: [Deprecated] Not used any more. * * @param schedule the schedule value to set. * @return the ComputeStartStopSchedule object itself. @@ -98,6 +202,12 @@ public ComputeStartStopSchedule withSchedule(ScheduleBase schedule) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (recurrence() != null) { + recurrence().validate(); + } + if (cron() != null) { + cron().validate(); + } if (schedule() != null) { schedule().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java index cdf3665c5a01..7555ff4c885c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ComputeType. */ +/** The type of compute. */ public final class ComputeType extends ExpandableStringEnum { /** Static value AKS for ComputeType. */ public static final ComputeType AKS = fromString("AKS"); 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 2da58eeb2d7a..c6c79b71d560 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 000000000000..6bb133d7734e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.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; + +/** Authentication type of the connection target. */ +public final class ConnectionAuthType extends ExpandableStringEnum { + /** Static value PAT for ConnectionAuthType. */ + public static final ConnectionAuthType PAT = fromString("PAT"); + + /** Static value ManagedIdentity for ConnectionAuthType. */ + public static final ConnectionAuthType MANAGED_IDENTITY = fromString("ManagedIdentity"); + + /** Static value UsernamePassword for ConnectionAuthType. */ + public static final ConnectionAuthType USERNAME_PASSWORD = fromString("UsernamePassword"); + + /** Static value None for ConnectionAuthType. */ + public static final ConnectionAuthType NONE = fromString("None"); + + /** Static value SAS for ConnectionAuthType. */ + public static final ConnectionAuthType SAS = fromString("SAS"); + + /** Static value ServicePrincipal for ConnectionAuthType. */ + public static final ConnectionAuthType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); + + /** Static value AccessKey for ConnectionAuthType. */ + public static final ConnectionAuthType ACCESS_KEY = fromString("AccessKey"); + + /** + * 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/CredentialsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java index ce6c8889b3fd..a0f9b5455984 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CredentialsType. */ +/** Enum to determine the datastore credentials type. */ public final class CredentialsType extends ExpandableStringEnum { /** Static value AccountKey for CredentialsType. */ public static final CredentialsType ACCOUNT_KEY = fromString("AccountKey"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java new file mode 100644 index 000000000000..211eabe0034f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 workflow trigger cron for ComputeStartStop schedule type. */ +@Fluent +public final class Cron { + /* + * The start time in yyyy-MM-ddTHH:mm:ss format. + */ + @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; + + /* + * [Required] Specifies cron expression of schedule. + * The expression should follow NCronTab format. + */ + @JsonProperty(value = "expression") + private String expression; + + /** + * Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @param startTime the startTime value to set. + * @return the Cron object itself. + */ + public Cron withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @param timeZone the timeZone value to set. + * @return the Cron object itself. + */ + public Cron withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow + * NCronTab format. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: [Required] Specifies cron expression of schedule. The expression should follow + * NCronTab format. + * + * @param expression the expression value to set. + * @return the Cron object itself. + */ + public Cron withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 71922cf32584..12eea9f3cad6 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 000000000000..235c58889c21 --- /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 d943e4959724..9b86651c289f 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 5e595b21bd15..ae37d949b83e 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 000000000000..5e3aac409845 --- /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 cccbc3bab2b9..59ae115c87e8 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 ec67bda20e92..f69c3a4d6cb5 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 f61ab9b1c020..5cdc7fe0617a 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 78b930a34228..782367112fca 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/DataFactory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java index 77a8fb84a887..ea62abb73276 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java @@ -27,13 +27,6 @@ public DataFactory withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public DataFactory withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java index 3d264fc82edd..de96623e4de0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java @@ -54,13 +54,6 @@ public DataLakeAnalytics withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public DataLakeAnalytics withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * 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 b22637a92e9f..000000000000 --- 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 cfa71f5d7777..39bc71378129 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 @@ -8,16 +8,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataType. */ +/** Enum to determine the type of data. */ 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 a3b595ae33fe..ad254ac4664f 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 ecf45ae7a65d..712c2d67c909 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.V20221001Preview.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.V20221001Preview.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.V20221001Preview.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 ad68313cd571..8879a8290552 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 11e5787a3ee0..75f80829a31e 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/Databricks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java index a05b3ec1bc0d..4a9c524770e3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java @@ -54,13 +54,6 @@ public Databricks withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public Databricks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * 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 000000000000..b083b01e8efe --- /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 9fe35264387e..92a0908a5641 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 efe01d39f09e..1837fd32f92b 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 b65e174ffbc8..7b6dbb35820b 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/DatastoreType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java index 305447f2d065..818fab8da747 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DatastoreType. */ +/** Enum to determine the datastore contents type. */ public final class DatastoreType extends ExpandableStringEnum { /** Static value AzureBlob for DatastoreType. */ public static final DatastoreType AZURE_BLOB = fromString("AzureBlob"); 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 807e16e260f9..fda61299d18e 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/DeploymentProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java index be24d57dd7c1..7b49a3592c2c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DeploymentProvisioningState. */ +/** Possible values for DeploymentProvisioningState. */ public final class DeploymentProvisioningState extends ExpandableStringEnum { /** Static value Creating for DeploymentProvisioningState. */ public static final DeploymentProvisioningState CREATING = fromString("Creating"); 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/DeploymentResourceConfiguration.java similarity index 56% 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/DeploymentResourceConfiguration.java index 76f0d72d1f46..0a12491462b1 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/DeploymentResourceConfiguration.java @@ -7,37 +7,30 @@ import com.azure.core.annotation.Fluent; import java.util.Map; -/** Container for code asset versions. */ +/** The DeploymentResourceConfiguration model. */ @Fluent -public final class CodeContainerDetails extends AssetContainer { +public final class DeploymentResourceConfiguration extends ResourceConfiguration { /** {@inheritDoc} */ @Override - public CodeContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public DeploymentResourceConfiguration withInstanceCount(Integer instanceCount) { + super.withInstanceCount(instanceCount); return this; } /** {@inheritDoc} */ @Override - public CodeContainerDetails withDescription(String description) { - super.withDescription(description); + public DeploymentResourceConfiguration withInstanceType(String instanceType) { + super.withInstanceType(instanceType); return this; } /** {@inheritDoc} */ @Override - public CodeContainerDetails withProperties(Map properties) { + public DeploymentResourceConfiguration withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ - @Override - public CodeContainerDetails withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java index 50bf327ad003..9a4e95617418 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DiagnoseResultLevel. */ +/** Level of workspace setup error. */ public final class DiagnoseResultLevel extends ExpandableStringEnum { /** Static value Warning for DiagnoseResultLevel. */ public static final DiagnoseResultLevel WARNING = fromString("Warning"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java index 3a3884ec9af5..b7fdf1249538 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DistributionType. */ +/** Enum to determine the job distribution type. */ public final class DistributionType extends ExpandableStringEnum { /** Static value PyTorch for DistributionType. */ public static final DistributionType PY_TORCH = fromString("PyTorch"); 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 000000000000..5a6bd8c34e3d --- /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/EgressPublicNetworkAccessType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java index 981312781c62..747ffbcdca9e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EgressPublicNetworkAccessType. */ +/** Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. */ public final class EgressPublicNetworkAccessType extends ExpandableStringEnum { /** Static value Enabled for EgressPublicNetworkAccessType. */ public static final EgressPublicNetworkAccessType ENABLED = fromString("Enabled"); 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 3fc151caa45e..b5f26771487a 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 000000000000..abe3d0444283 --- /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 6ee9b191bbda..59fcd1fbb4ea 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/EncryptionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java index 93a1b82a0ddc..a9a34f9fa37a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EncryptionStatus. */ +/** Indicates whether or not the encryption is enabled for the workspace. */ public final class EncryptionStatus extends ExpandableStringEnum { /** Static value Enabled for EncryptionStatus. */ public static final EncryptionStatus ENABLED = fromString("Enabled"); 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 000000000000..d176039cc536 --- /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 000000000000..c1324bc1c725 --- /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/EndpointAuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java index 99d8a3880ca9..f5bb771f5190 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EndpointAuthMode. */ +/** Enum to determine endpoint authentication mode. */ public final class EndpointAuthMode extends ExpandableStringEnum { /** Static value AMLToken for EndpointAuthMode. */ public static final EndpointAuthMode AMLTOKEN = fromString("AMLToken"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java index 4d8979f128b4..2fa88d15dc40 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EndpointComputeType. */ +/** Enum to determine endpoint compute type. */ public final class EndpointComputeType extends ExpandableStringEnum { /** Static value Managed for EndpointComputeType. */ public static final EndpointComputeType MANAGED = fromString("Managed"); 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 f547c746ef2b..9d8986323cd9 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/EndpointProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java index 81563056ba0f..18267c8fe288 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EndpointProvisioningState. */ +/** State of endpoint provisioning. */ public final class EndpointProvisioningState extends ExpandableStringEnum { /** Static value Creating for EndpointProvisioningState. */ public static final EndpointProvisioningState CREATING = fromString("Creating"); 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 000000000000..08174a58e13e --- /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/ComponentVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java similarity index 69% 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/EnvironmentContainer.java index f10b5ef1c021..68fe0efe8b74 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/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.ComponentVersionDataInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -/** An immutable client-side representation of ComponentVersionData. */ -public interface ComponentVersionData { +/** 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 ComponentVersionData { * * @return the properties value. */ - ComponentVersionDetails properties(); + EnvironmentContainerProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,37 +53,36 @@ 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.EnvironmentContainerInner object. * * @return the inner object. */ - ComponentVersionDataInner innerModel(); + EnvironmentContainerInner innerModel(); - /** The entirety of the ComponentVersionData definition. */ + /** The entirety of the EnvironmentContainer definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ComponentVersionData definition stages. */ + /** The EnvironmentContainer definition stages. */ interface DefinitionStages { - /** The first stage of the ComponentVersionData definition. */ + /** The first stage of the EnvironmentContainer definition. */ interface Blank extends WithParentResource { } - /** The stage of the ComponentVersionData definition allowing to specify parent resource. */ + /** The stage of the EnvironmentContainer definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName, name. + * Specifies resourceGroupName, registryName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. + * @param registryName Name of Azure Machine Learning registry. * @return the next definition stage. */ - WithProperties withExistingComponent(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingRegistry(String resourceGroupName, String registryName); } - /** The stage of the ComponentVersionData 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.. @@ -91,10 +90,10 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(ComponentVersionDetails properties); + WithCreate withProperties(EnvironmentContainerProperties properties); } /** - * The stage of the ComponentVersionData definition which contains all the minimum required properties for the + * 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 { @@ -103,7 +102,7 @@ interface WithCreate { * * @return the created resource. */ - ComponentVersionData create(); + EnvironmentContainer create(); /** * Executes the create request. @@ -111,24 +110,24 @@ interface WithCreate { * @param context The context to associate with this operation. * @return the created resource. */ - ComponentVersionData create(Context context); + EnvironmentContainer create(Context context); } } /** - * Begins update for the ComponentVersionData resource. + * Begins update for the EnvironmentContainer resource. * * @return the stage of resource update. */ - ComponentVersionData.Update update(); + EnvironmentContainer.Update update(); - /** The template for ComponentVersionData update. */ + /** The template for EnvironmentContainer update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - ComponentVersionData apply(); + EnvironmentContainer 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. */ - ComponentVersionData apply(Context context); + EnvironmentContainer apply(Context context); } - /** The ComponentVersionData update stages. */ + /** The EnvironmentContainer update stages. */ interface UpdateStages { - /** The stage of the ComponentVersionData 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.. @@ -148,7 +147,7 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(ComponentVersionDetails properties); + Update withProperties(EnvironmentContainerProperties properties); } } /** @@ -156,7 +155,7 @@ interface WithProperties { * * @return the refreshed resource. */ - ComponentVersionData refresh(); + EnvironmentContainer refresh(); /** * Refreshes the resource to sync with Azure. @@ -164,5 +163,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - ComponentVersionData refresh(Context context); + EnvironmentContainer refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerData.java deleted file mode 100644 index a197e16654b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerData.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; - -/** An immutable client-side representation of EnvironmentContainerData. */ -public interface EnvironmentContainerData { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - EnvironmentContainerDetails properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner object. - * - * @return the inner object. - */ - EnvironmentContainerDataInner innerModel(); - - /** The entirety of the EnvironmentContainerData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The EnvironmentContainerData definition stages. */ - interface DefinitionStages { - /** The first stage of the EnvironmentContainerData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the EnvironmentContainerData definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the EnvironmentContainerData definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(EnvironmentContainerDetails properties); - } - /** - * The stage of the EnvironmentContainerData definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - EnvironmentContainerData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EnvironmentContainerData create(Context context); - } - } - /** - * Begins update for the EnvironmentContainerData resource. - * - * @return the stage of resource update. - */ - EnvironmentContainerData.Update update(); - - /** The template for EnvironmentContainerData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EnvironmentContainerData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EnvironmentContainerData apply(Context context); - } - /** The EnvironmentContainerData update stages. */ - interface UpdateStages { - /** The stage of the EnvironmentContainerData update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(EnvironmentContainerDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EnvironmentContainerData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EnvironmentContainerData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java similarity index 51% 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 fe093805a4b8..c29938854387 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 @@ -5,35 +5,51 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Container for environment specification versions. */ @Fluent -public final class EnvironmentContainerDetails extends AssetContainer { +public final class EnvironmentContainerProperties extends AssetContainer { + /* + * Provisioning state for the environment container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /** + * Get the provisioningState property: Provisioning state for the environment container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@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 e092db27c6b0..c433338fdf01 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 1ff0f06b34e2..121ca339590f 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 @@ -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 com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; /** Resource collection API of EnvironmentContainers. */ public interface EnvironmentContainers { @@ -20,7 +21,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 +36,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 +76,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,59 +90,37 @@ 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); /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - EnvironmentContainerData getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ - void deleteById(String id); + EnvironmentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentContainerData resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentContainerData definition. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - EnvironmentContainerData.DefinitionStages.Blank define(String name); + 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/models/EnvironmentType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java index ffcc56a82658..c39dd34fe025 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EnvironmentType. */ +/** Environment type is either user created or curated by Azure ML service. */ public final class EnvironmentType extends ExpandableStringEnum { /** Static value Curated for EnvironmentType. */ public static final EnvironmentType CURATED = fromString("Curated"); 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 000000000000..21d401e9bd62 --- /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 000000000000..a2b0cdd87d6f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of Environment Variable + * + *

Type of the Environment Variable. Possible values are: local - For local variable. + */ +public final class EnvironmentVariableType extends ExpandableStringEnum { + /** Static value local for EnvironmentVariableType. */ + public static final EnvironmentVariableType LOCAL = fromString("local"); + + /** + * Creates 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 68% 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 088be7f710ef..bafdb6fe9184 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,37 +53,38 @@ 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. + * Specifies resourceGroupName, registryName, environmentName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. * @return the next definition stage. */ - WithProperties withExistingEnvironment(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingEnvironment( + String resourceGroupName, String registryName, String environmentName); } - /** 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 +92,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 +104,7 @@ interface WithCreate { * * @return the created resource. */ - EnvironmentVersionData create(); + EnvironmentVersion create(); /** * Executes the create request. @@ -111,24 +112,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 +137,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 +149,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 +157,7 @@ interface WithProperties { * * @return the refreshed resource. */ - EnvironmentVersionData refresh(); + EnvironmentVersion refresh(); /** * Refreshes the resource to sync with Azure. @@ -164,5 +165,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 75% 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 3609c2a64576..2e1b8def4562 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; @@ -59,6 +56,12 @@ public final class EnvironmentVersionDetails extends AssetBase { @JsonProperty(value = "osType") private OperatingSystemType osType; + /* + * Provisioning state for the environment version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** * Get the build property: Configuration settings for Docker build context. * @@ -72,9 +75,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 +101,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 +137,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 +157,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 +177,53 @@ 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; } + /** + * Get the provisioningState property: Provisioning state for the environment version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@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 1423e6bfe747..6b2226ed0590 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 e35c0d05eb3a..dd3be17402f1 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 @@ -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 com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; /** Resource collection API of EnvironmentVersions. */ public interface EnvironmentVersions { @@ -21,7 +22,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 +40,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 +91,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,59 +106,44 @@ 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); /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - EnvironmentVersionData getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. + * Creates or updates an EnvironmentVersion. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Name of EnvironmentVersion. This is case-sensitive. + * @param version Version of EnvironmentVersion. + * @param body Definition of EnvironmentVersion. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ - void deleteById(String id); + EnvironmentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body); /** - * Delete version. + * Creates or updates an EnvironmentVersion. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Name of EnvironmentVersion. This is case-sensitive. + * @param version Version of EnvironmentVersion. + * @param body Definition of EnvironmentVersion. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentVersionData resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentVersionData definition. - */ - EnvironmentVersionData.DefinitionStages.Blank define(String name); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + EnvironmentVersionInner body, + Context context); } 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 d6d2ed9180c3..e618bf66ea5d 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 d56a96c2434b..f4e1d04c176a 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 000000000000..758f507fb2c0 --- /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; + +/** The format of exported labels. */ +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 000000000000..4978cbaefd1c --- /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/FeatureLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java index e8ef06a0db5c..a83c66d110e5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FeatureLags. */ +/** Flag for generating lags for the numeric features. */ public final class FeatureLags extends ExpandableStringEnum { /** Static value None for FeatureLags. */ public static final FeatureLags NONE = fromString("None"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java index d59613475859..fd094d3664d8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FeaturizationMode. */ +/** Featurization mode - determines data featurization mode. */ public final class FeaturizationMode extends ExpandableStringEnum { /** Static value Auto for FeaturizationMode. */ public static final FeaturizationMode AUTO = fromString("Auto"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java index 79a78c145fd5..cc2b3c39a566 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ForecastHorizonMode. */ +/** Enum to determine forecast horizon selection mode. */ public final class ForecastHorizonMode extends ExpandableStringEnum { /** Static value Auto for ForecastHorizonMode. */ public static final ForecastHorizonMode AUTO = fromString("Auto"); 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 6fb8de9dc3cd..1dbe0b95beaa 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 = "trainingSettings") + private ForecastingTrainingSettings trainingSettings; + + /* + * Columns to use for CVSplit data. */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; + @JsonProperty(value = "cvSplitColumnNames") + private List cvSplitColumnNames; /* * Featurization inputs needed for AutoML job. @@ -51,6 +45,12 @@ public final class Forecasting extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private TableVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private TableFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @@ -58,50 +58,58 @@ 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. + /* + * Search space for sampling different combinations of models and their hyperparameters. */ - public List allowedModels() { - return this.allowedModels; - } + @JsonProperty(value = "searchSpace") + private List searchSpace; - /** - * Set the allowedModels property: Allowed models for forecasting task. - * - * @param allowedModels the allowedModels value to set. - * @return the Forecasting object itself. + /* + * Settings for model sweeping and hyperparameter tuning. */ - public Forecasting withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } + @JsonProperty(value = "sweepSettings") + private TableSweepSettings sweepSettings; - /** - * Get the blockedModels property: Blocked models for forecasting task. - * - * @return the blockedModels value. + /* + * Test data input. */ - public List blockedModels() { - return this.blockedModels; - } + @JsonProperty(value = "testData") + private MLTableJobInput testData; - /** - * Set the blockedModels property: Blocked models for forecasting task. - * - * @param blockedModels the blockedModels 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 withBlockedModels(List blockedModels) { - this.blockedModels = blockedModels; - 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 forecastingSettings property: Forecasting task specific inputs. @@ -144,22 +152,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; } @@ -183,6 +211,26 @@ public Forecasting withFeaturizationSettings(TableVerticalFeaturizationSettings return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public TableFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the Forecasting object itself. + */ + public Forecasting withFixedParameters(TableFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. * @@ -204,22 +252,172 @@ 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 searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the Forecasting object itself. + */ + public Forecasting withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public TableSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the Forecasting object itself. + */ + public Forecasting withSweepSettings(TableSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + 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 +428,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,17 +453,32 @@ public void validate() { if (forecastingSettings() != null) { forecastingSettings().validate(); } - if (dataSettings() != null) { - dataSettings().validate(); + if (trainingSettings() != null) { + trainingSettings().validate(); } if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } - if (trainingSettings() != null) { - trainingSettings().validate(); + if (nCrossValidations() != null) { + nCrossValidations().validate(); + } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } + if (testData() != null) { + testData().validate(); + } + if (validationData() != null) { + validationData().validate(); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java index 6af7db8b880b..2e59b2152b77 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ForecastingModels. */ +/** Enum for all forecasting models supported by AutoML. */ public final class ForecastingModels extends ExpandableStringEnum { /** Static value AutoArima for ForecastingModels. */ public static final ForecastingModels AUTO_ARIMA = fromString("AutoArima"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java index d9e5cdc97ea5..45f8e8bcc37c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ForecastingPrimaryMetrics. */ +/** Primary metrics for Forecasting task. */ public final class ForecastingPrimaryMetrics extends ExpandableStringEnum { /** Static value SpearmanCorrelation for ForecastingPrimaryMetrics. */ public static final ForecastingPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); 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 69b4eac61902..e053c68fbae9 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 000000000000..c8e8d08a6cf4 --- /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/Goal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java index 5506fa96adcf..8ecd4eca8abd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Goal. */ +/** Defines supported metric goals for hyperparameter tuning. */ public final class Goal extends ExpandableStringEnum { /** Static value Minimize for Goal. */ public static final Goal MINIMIZE = fromString("Minimize"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java index 43bca53088ea..ad3f6b706375 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java @@ -54,13 +54,6 @@ public HDInsight withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public HDInsight withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * 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 78657ac863ea..1be9d04713bd 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/IdentityConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java index 339ffac53b88..1a260222ec84 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for IdentityConfigurationType. */ +/** Enum to determine identity framework. */ public final class IdentityConfigurationType extends ExpandableStringEnum { /** Static value Managed for IdentityConfigurationType. */ public static final IdentityConfigurationType MANAGED = fromString("Managed"); 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 e04ce968ccc4..2b21a0e6aeda 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 000000000000..6111f349c98f --- /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 000000000000..77d29ae53483 --- /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 000000000000..24528b787a38 --- /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; + +/** Annotation type of image data. */ +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 752eb27aa901..19dddb9421ca 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 2c7c7d78b678..85456129386b 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 c0ba2ca2140b..a52c3a43b5e5 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/ImageMetadata.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java new file mode 100644 index 000000000000..bcabfdefb510 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Returns metadata about the operating system image for this compute instance. */ +@Fluent +public final class ImageMetadata { + /* + * Specifies the current operating system image version this compute instance is running on. + */ + @JsonProperty(value = "currentImageVersion") + private String currentImageVersion; + + /* + * Specifies the latest available operating system image version. + */ + @JsonProperty(value = "latestImageVersion") + private String latestImageVersion; + + /* + * Specifies whether this compute instance is running on the latest operating system image. + */ + @JsonProperty(value = "isLatestOsImageVersion") + private Boolean isLatestOsImageVersion; + + /** + * Get the currentImageVersion property: Specifies the current operating system image version this compute instance + * is running on. + * + * @return the currentImageVersion value. + */ + public String currentImageVersion() { + return this.currentImageVersion; + } + + /** + * Set the currentImageVersion property: Specifies the current operating system image version this compute instance + * is running on. + * + * @param currentImageVersion the currentImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withCurrentImageVersion(String currentImageVersion) { + this.currentImageVersion = currentImageVersion; + return this; + } + + /** + * Get the latestImageVersion property: Specifies the latest available operating system image version. + * + * @return the latestImageVersion value. + */ + public String latestImageVersion() { + return this.latestImageVersion; + } + + /** + * Set the latestImageVersion property: Specifies the latest available operating system image version. + * + * @param latestImageVersion the latestImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withLatestImageVersion(String latestImageVersion) { + this.latestImageVersion = latestImageVersion; + return this; + } + + /** + * Get the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest + * operating system image. + * + * @return the isLatestOsImageVersion value. + */ + public Boolean isLatestOsImageVersion() { + return this.isLatestOsImageVersion; + } + + /** + * Set the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest + * operating system image. + * + * @param isLatestOsImageVersion the isLatestOsImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withIsLatestOsImageVersion(Boolean isLatestOsImageVersion) { + this.isLatestOsImageVersion = isLatestOsImageVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 7632a871cbdc..a84aca7f535e 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 0bbfd9392f0f..86542eb93d9c 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 4a1d8df91b97..641338863bf7 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 29c1d42ca455..b11ad16be96b 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 38153e69f12d..979595807324 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 9d79afb1992a..2e55fa8d4f65 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 7bbc8629bbc8..a47639df1e63 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 c07185d60cff..52f2da8a4658 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(ListType of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + */ +public final class ImageType extends ExpandableStringEnum { + /** Static value docker for ImageType. */ + public static final ImageType DOCKER = fromString("docker"); + + /** Static value azureml for ImageType. */ + public static final ImageType AZUREML = fromString("azureml"); + + /** + * Creates 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 ec807a1c2c4a..9a358e8ccde0 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 d2ea7cb6a60c..000000000000 --- 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 379528c0c12f..000000000000 --- 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 a34ad497637e..0cb39f2c553c 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/InputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java index f83179d08a1c..eadc8899f16d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InputDeliveryMode. */ +/** Enum to determine the input data delivery mode. */ public final class InputDeliveryMode extends ExpandableStringEnum { /** Static value ReadOnlyMount for InputDeliveryMode. */ public static final InputDeliveryMode READ_ONLY_MOUNT = fromString("ReadOnlyMount"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java index 1b9e942cbe37..b4a053f4c353 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InstanceSegmentationPrimaryMetrics. */ +/** Primary metrics for InstanceSegmentation tasks. */ public final class InstanceSegmentationPrimaryMetrics extends ExpandableStringEnum { /** Static value MeanAveragePrecision for InstanceSegmentationPrimaryMetrics. */ public static final InstanceSegmentationPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); 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 8ab96f963cf3..3e18abd293bd 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 a710530ab7f1..8f2ec2fe6f2c 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 fd407407a447..4f3146d42fbb 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 f199a9b1d510..7dbaeab56506 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 a6bf86251e04..c8aa9ba96b9f 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 @@ -8,28 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for JobInputType. */ +/** Enum to determine the Job Input Type. */ public final class JobInputType extends ExpandableStringEnum { - /** Static value Literal for JobInputType. */ - public static final JobInputType LITERAL = fromString("Literal"); + /** Static value 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 42eb703e246f..439d0bf70232 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 6204ce4d27cf..66ad70ab29d2 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 23f9d16fd47c..b8595eedce22 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 @@ -8,25 +8,25 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for JobOutputType. */ +/** Enum to determine the Job Output Type. */ 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 000000000000..85d5c4a5f8fd --- /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; + +/** Enum to determine the job provisioning state. */ +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 000000000000..1c4012514a00 --- /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 000000000000..6889ff25a9b6 --- /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/JobService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java index ee961f84b0f5..9fd4b35536ce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java @@ -31,7 +31,14 @@ public final class JobService { private String jobServiceType; /* - * Port for endpoint. + * Nodes that user would like to start the service on. + * If Nodes is not set or set to null, the service will only be started on leader node. + */ + @JsonProperty(value = "nodes") + private Nodes nodes; + + /* + * Port for endpoint set by user. */ @JsonProperty(value = "port") private Integer port; @@ -99,7 +106,29 @@ public JobService withJobServiceType(String jobServiceType) { } /** - * Get the port property: Port for endpoint. + * Get the nodes property: Nodes that user would like to start the service on. If Nodes is not set or set to null, + * the service will only be started on leader node. + * + * @return the nodes value. + */ + public Nodes nodes() { + return this.nodes; + } + + /** + * Set the nodes property: Nodes that user would like to start the service on. If Nodes is not set or set to null, + * the service will only be started on leader node. + * + * @param nodes the nodes value to set. + * @return the JobService object itself. + */ + public JobService withNodes(Nodes nodes) { + this.nodes = nodes; + return this; + } + + /** + * Get the port property: Port for endpoint set by user. * * @return the port value. */ @@ -108,7 +137,7 @@ public Integer port() { } /** - * Set the port property: Port for endpoint. + * Set the port property: Port for endpoint set by user. * * @param port the port value to set. * @return the JobService object itself. @@ -153,5 +182,8 @@ public String status() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (nodes() != null) { + nodes().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java index 68313ffb2ca6..053db5ab8f73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for JobStatus. */ +/** The status of a job. */ public final class JobStatus extends ExpandableStringEnum { /** Static value NotStarted for JobStatus. */ public static final JobStatus NOT_STARTED = fromString("NotStarted"); 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 04f1769d5774..6dce981cd077 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for JobType. */ +/** Enum to determine the type of job. */ public final class JobType extends ExpandableStringEnum { /** Static value AutoML for JobType. */ public static final JobType AUTO_ML = fromString("AutoML"); @@ -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 7663da5b1b7b..2fcdbcdc2375 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 d885160183b6..3dea326f853a 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 d080800ab04e..387f3b33923d 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 2210056b5f4d..7a25327566cd 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/Kubernetes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java index e2733f2bbdd8..26e76e24f831 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java @@ -54,13 +54,6 @@ public Kubernetes withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public Kubernetes withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * 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 01e573a78520..6825ed6cbf8d 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 000000000000..59a8c4ab562c --- /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 000000000000..0a8809e63321 --- /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 000000000000..19779e18edf2 --- /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 000000000000..53aabdc612d5 --- /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 000000000000..a007b358dbd6 --- /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 000000000000..878f11d5c5ce --- /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 0843c1eacbca..6b27b50c03c8 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 000000000000..3c1b6330cdef --- /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 000000000000..f613800221d7 --- /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 000000000000..a8376fa69c42 --- /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 000000000000..c4a8473128c1 --- /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/LearningRateScheduler.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java index 7c23f49432ff..314c661ae3c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LearningRateScheduler. */ +/** Learning rate scheduler enum. */ public final class LearningRateScheduler extends ExpandableStringEnum { /** Static value None for LearningRateScheduler. */ public static final LearningRateScheduler NONE = fromString("None"); 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 734a5f698344..7ee84c68173f 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 20d35a418ec8..4dd781c0889c 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 189878d1d5fb..025842b39e5c 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 1a6ba7478d16..daac4d2172e0 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/LoadBalancerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java index fae29e9810e1..b1a756297a11 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LoadBalancerType. */ +/** Load Balancer Type. */ public final class LoadBalancerType extends ExpandableStringEnum { /** Static value PublicIp for LoadBalancerType. */ public static final LoadBalancerType PUBLIC_IP = fromString("PublicIp"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java index 31deaf258b80..bf3554a8e407 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LogVerbosity. */ +/** Enum for setting log verbosity. */ public final class LogVerbosity extends ExpandableStringEnum { /** Static value NotSet for LogVerbosity. */ public static final LogVerbosity NOT_SET = fromString("NotSet"); 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 030c087c98c9..ed0f367f46af 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/PartialKubernetesOnlineDeployment.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/PartialKubernetesOnlineDeployment.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java index 31d7dc680c47..754c53acdf74 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/MLAssistConfigurationDisabled.java @@ -8,11 +8,11 @@ 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") +/** 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 PartialKubernetesOnlineDeployment 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 000000000000..efb09bbe7804 --- /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 000000000000..f57ace0f4d51 --- /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/MLFlowAutologgerState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowAutologgerState.java new file mode 100644 index 000000000000..7434e50a0c3a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowAutologgerState.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; + +/** Enum to determine the state of mlflow autologger. */ +public final class MLFlowAutologgerState extends ExpandableStringEnum { + /** Static value Enabled for MLFlowAutologgerState. */ + public static final MLFlowAutologgerState ENABLED = fromString("Enabled"); + + /** Static value Disabled for MLFlowAutologgerState. */ + public static final MLFlowAutologgerState DISABLED = fromString("Disabled"); + + /** + * Creates or finds a MLFlowAutologgerState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MLFlowAutologgerState. + */ + @JsonCreator + public static MLFlowAutologgerState fromString(String name) { + return fromString(name, MLFlowAutologgerState.class); + } + + /** + * Gets known MLFlowAutologgerState values. + * + * @return known MLFlowAutologgerState values. + */ + public static Collection values() { + return values(MLFlowAutologgerState.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 c7348c7fb755..aa9e20c05ce0 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 826b8d43d63a..1609f2e2867b 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 6b0f9ed108f8..0aabd81bf11e 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 fc727a6412a7..495e6abf0407 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 d3e0e4016825..7fb2b26a783b 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 b2043af3eaf4..1ab0cd98c88a 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 000000000000..7da18433af88 --- /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(String 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 369fafc05b95..6c33fd76f1ce 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 c31c18ce491e..6f8d4fd2311f 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/ManagedServiceIdentityType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java index 6fc06446cb0d..667e1c90a3a6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedServiceIdentityType. */ +/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** Static value None for ManagedServiceIdentityType. */ public static final ManagedServiceIdentityType NONE = fromString("None"); 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 000000000000..80053dacfbae --- /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; + +/** Media type of data asset. */ +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/MlflowAutologger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java new file mode 100644 index 000000000000..1bf5a22f3d22 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.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; + +/** Indicates whether mlflow autologger is enabled for notebooks. */ +public final class MlflowAutologger extends ExpandableStringEnum { + /** Static value Enabled for MlflowAutologger. */ + public static final MlflowAutologger ENABLED = fromString("Enabled"); + + /** Static value Disabled for MlflowAutologger. */ + public static final MlflowAutologger DISABLED = fromString("Disabled"); + + /** + * Creates or finds a MlflowAutologger from its string representation. + * + * @param name a name to look for. + * @return the corresponding MlflowAutologger. + */ + @JsonCreator + public static MlflowAutologger fromString(String name) { + return fromString(name, MlflowAutologger.class); + } + + /** + * Gets known MlflowAutologger values. + * + * @return known MlflowAutologger values. + */ + public static Collection values() { + return values(MlflowAutologger.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java new file mode 100644 index 000000000000..a8305c6c4dff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.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.ModelContainerInner; + +/** An immutable client-side representation of ModelContainer. */ +public interface ModelContainer { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + ModelContainerProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner object. + * + * @return the inner object. + */ + ModelContainerInner innerModel(); + + /** The entirety of the ModelContainer definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The ModelContainer definition stages. */ + interface DefinitionStages { + /** The first stage of the ModelContainer definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the ModelContainer definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @return the next definition stage. + */ + WithProperties withExistingRegistry(String resourceGroupName, String registryName); + } + /** The stage of the ModelContainer definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(ModelContainerProperties properties); + } + /** + * The stage of the ModelContainer definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate { + /** + * Executes the create request. + * + * @return the created resource. + */ + ModelContainer create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ModelContainer create(Context context); + } + } + /** + * Begins update for the ModelContainer resource. + * + * @return the stage of resource update. + */ + ModelContainer.Update update(); + + /** The template for ModelContainer update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ModelContainer apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ModelContainer apply(Context context); + } + /** The ModelContainer update stages. */ + interface UpdateStages { + /** The stage of the ModelContainer update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(ModelContainerProperties properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ModelContainer refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ModelContainer refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java deleted file mode 100644 index 20fcd6820c0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import java.util.Map; - -/** The ModelContainerDetails model. */ -@Fluent -public final class ModelContainerDetails extends AssetContainer { - /** {@inheritDoc} */ - @Override - public ModelContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerDetails withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java new file mode 100644 index 000000000000..0516763a15dc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 ModelContainerProperties model. */ +@Fluent +public final class ModelContainerProperties extends AssetContainer { + /* + * Provisioning state for the model container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /** + * Get the provisioningState property: Provisioning state for the model container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@inheritDoc} */ + @Override + public ModelContainerProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public ModelContainerProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public ModelContainerProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public ModelContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java index adf8b64de64a..5e3eb5767365 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 c629ea65fcae..f09188b7b446 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 @@ -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 com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; /** Resource collection API of ModelContainers. */ public interface ModelContainers { @@ -20,7 +21,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 +37,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 +82,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,59 +96,37 @@ 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); /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - ModelContainerData getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ - void deleteById(String id); + ModelContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ModelContainerData resource. - * - * @param name resource name. - * @return the first stage of the new ModelContainerData definition. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - ModelContainerData.DefinitionStages.Blank define(String name); + 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/models/ModelSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java index 957999f455e6..e78b56deb242 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ModelSize. */ +/** Image model size. */ public final class ModelSize extends ExpandableStringEnum { /** Static value None for ModelSize. */ public static final ModelSize NONE = fromString("None"); 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 457991e34222..000000000000 --- 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/ModelVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java new file mode 100644 index 000000000000..bae47c6d0296 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; + +/** An immutable client-side representation of ModelVersion. */ +public interface ModelVersion { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + ModelVersionProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner object. + * + * @return the inner object. + */ + ModelVersionInner innerModel(); + + /** The entirety of the ModelVersion definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The ModelVersion definition stages. */ + interface DefinitionStages { + /** The first stage of the ModelVersion definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the ModelVersion definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName, modelName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @return the next definition stage. + */ + WithProperties withExistingModel(String resourceGroupName, String registryName, String modelName); + } + /** The stage of the ModelVersion definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(ModelVersionProperties properties); + } + /** + * The stage of the ModelVersion definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate { + /** + * Executes the create request. + * + * @return the created resource. + */ + ModelVersion create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ModelVersion create(Context context); + } + } + /** + * Begins update for the ModelVersion resource. + * + * @return the stage of resource update. + */ + ModelVersion.Update update(); + + /** The template for ModelVersion update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ModelVersion apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ModelVersion apply(Context context); + } + /** The ModelVersion update stages. */ + interface UpdateStages { + /** The stage of the ModelVersion update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(ModelVersionProperties properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ModelVersion refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ModelVersion refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java similarity index 71% 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 9da6e6feee08..f00d0f8f342e 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. @@ -37,6 +37,12 @@ public final class ModelVersionDetails extends AssetBase { @JsonProperty(value = "modelUri") private String modelUri; + /* + * Provisioning state for the model version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** * Get the flavors property: Mapping of model flavors to their properties. * @@ -50,9 +56,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 +76,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 +88,7 @@ public ModelVersionDetails withJobName(String jobName) { * * @return the modelType value. */ - public ModelType modelType() { + public String modelType() { return this.modelType; } @@ -90,9 +96,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 +116,53 @@ 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; } + /** + * Get the provisioningState property: Provisioning state for the model version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@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 eeefe6c1d55e..82e3c4fbc04d 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 01f803ff7734..0a766d175be2 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 @@ -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 com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; /** Resource collection API of ModelVersions. */ public interface ModelVersions { @@ -21,7 +22,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 +46,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 +103,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,59 +118,44 @@ 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); /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - ModelVersionData getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ - void deleteById(String id); + ModelVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body); /** - * Delete version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ModelVersionData resource. - * - * @param name resource name. - * @return the first stage of the new ModelVersionData definition. - */ - ModelVersionData.DefinitionStages.Blank define(String name); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ModelVersionInner body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java index 6b85260ad079..8f4c16179dce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MountAction. */ +/** Mount Action. */ public final class MountAction extends ExpandableStringEnum { /** Static value Mount for MountAction. */ public static final MountAction MOUNT = fromString("Mount"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java index 17b2a95004ad..b071f9f5bc3a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MountState. */ +/** Mount state. */ public final class MountState extends ExpandableStringEnum { /** Static value MountRequested for MountState. */ public static final MountState MOUNT_REQUESTED = fromString("MountRequested"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java index 74d8949c003f..e882f785ec87 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NCrossValidationsMode. */ +/** Determines how N-Cross validations value is determined. */ public final class NCrossValidationsMode extends ExpandableStringEnum { /** Static value Auto for NCrossValidationsMode. */ public static final NCrossValidationsMode AUTO = fromString("Auto"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java index d1d98fcb349a..7f35456b5ab1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Network. */ +/** network of this container. */ public final class Network extends ExpandableStringEnum { /** Static value Bridge for Network. */ public static final Network BRIDGE = fromString("Bridge"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpFixedParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpFixedParameters.java new file mode 100644 index 000000000000..49a932cfb195 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpFixedParameters.java @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Fixed training parameters that won't be swept over during AutoML NLP training. */ +@Fluent +public final class NlpFixedParameters { + /* + * Number of steps to accumulate gradients over before running a backward pass. + */ + @JsonProperty(value = "gradientAccumulationSteps") + private Integer gradientAccumulationSteps; + + /* + * The learning rate for the training procedure. + */ + @JsonProperty(value = "learningRate") + private Float learningRate; + + /* + * The type of learning rate schedule to use during the training procedure. + */ + @JsonProperty(value = "learningRateScheduler") + private NlpLearningRateScheduler learningRateScheduler; + + /* + * The name of the model to train. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * Number of training epochs. + */ + @JsonProperty(value = "numberOfEpochs") + private Integer numberOfEpochs; + + /* + * The batch size for the training procedure. + */ + @JsonProperty(value = "trainingBatchSize") + private Integer trainingBatchSize; + + /* + * The batch size to be used during evaluation. + */ + @JsonProperty(value = "validationBatchSize") + private Integer validationBatchSize; + + /* + * The warmup ratio, used alongside LrSchedulerType. + */ + @JsonProperty(value = "warmupRatio") + private Float warmupRatio; + + /* + * The weight decay for the training procedure. + */ + @JsonProperty(value = "weightDecay") + private Float weightDecay; + + /** + * Get the gradientAccumulationSteps property: Number of steps to accumulate gradients over before running a + * backward pass. + * + * @return the gradientAccumulationSteps value. + */ + public Integer gradientAccumulationSteps() { + return this.gradientAccumulationSteps; + } + + /** + * Set the gradientAccumulationSteps property: Number of steps to accumulate gradients over before running a + * backward pass. + * + * @param gradientAccumulationSteps the gradientAccumulationSteps value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withGradientAccumulationSteps(Integer gradientAccumulationSteps) { + this.gradientAccumulationSteps = gradientAccumulationSteps; + return this; + } + + /** + * Get the learningRate property: The learning rate for the training procedure. + * + * @return the learningRate value. + */ + public Float learningRate() { + return this.learningRate; + } + + /** + * Set the learningRate property: The learning rate for the training procedure. + * + * @param learningRate the learningRate value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withLearningRate(Float learningRate) { + this.learningRate = learningRate; + return this; + } + + /** + * Get the learningRateScheduler property: The type of learning rate schedule to use during the training procedure. + * + * @return the learningRateScheduler value. + */ + public NlpLearningRateScheduler learningRateScheduler() { + return this.learningRateScheduler; + } + + /** + * Set the learningRateScheduler property: The type of learning rate schedule to use during the training procedure. + * + * @param learningRateScheduler the learningRateScheduler value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withLearningRateScheduler(NlpLearningRateScheduler learningRateScheduler) { + this.learningRateScheduler = learningRateScheduler; + return this; + } + + /** + * Get the modelName property: The name of the model to train. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model to train. + * + * @param modelName the modelName value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the numberOfEpochs property: Number of training epochs. + * + * @return the numberOfEpochs value. + */ + public Integer numberOfEpochs() { + return this.numberOfEpochs; + } + + /** + * Set the numberOfEpochs property: Number of training epochs. + * + * @param numberOfEpochs the numberOfEpochs value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withNumberOfEpochs(Integer numberOfEpochs) { + this.numberOfEpochs = numberOfEpochs; + return this; + } + + /** + * Get the trainingBatchSize property: The batch size for the training procedure. + * + * @return the trainingBatchSize value. + */ + public Integer trainingBatchSize() { + return this.trainingBatchSize; + } + + /** + * Set the trainingBatchSize property: The batch size for the training procedure. + * + * @param trainingBatchSize the trainingBatchSize value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withTrainingBatchSize(Integer trainingBatchSize) { + this.trainingBatchSize = trainingBatchSize; + return this; + } + + /** + * Get the validationBatchSize property: The batch size to be used during evaluation. + * + * @return the validationBatchSize value. + */ + public Integer validationBatchSize() { + return this.validationBatchSize; + } + + /** + * Set the validationBatchSize property: The batch size to be used during evaluation. + * + * @param validationBatchSize the validationBatchSize value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withValidationBatchSize(Integer validationBatchSize) { + this.validationBatchSize = validationBatchSize; + return this; + } + + /** + * Get the warmupRatio property: The warmup ratio, used alongside LrSchedulerType. + * + * @return the warmupRatio value. + */ + public Float warmupRatio() { + return this.warmupRatio; + } + + /** + * Set the warmupRatio property: The warmup ratio, used alongside LrSchedulerType. + * + * @param warmupRatio the warmupRatio value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withWarmupRatio(Float warmupRatio) { + this.warmupRatio = warmupRatio; + return this; + } + + /** + * Get the weightDecay property: The weight decay for the training procedure. + * + * @return the weightDecay value. + */ + public Float weightDecay() { + return this.weightDecay; + } + + /** + * Set the weightDecay property: The weight decay for the training procedure. + * + * @param weightDecay the weightDecay value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withWeightDecay(Float weightDecay) { + this.weightDecay = weightDecay; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpLearningRateScheduler.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpLearningRateScheduler.java new file mode 100644 index 000000000000..3c0ac2d5d66a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpLearningRateScheduler.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; + +/** Enum of learning rate schedulers that aligns with those supported by HF. */ +public final class NlpLearningRateScheduler extends ExpandableStringEnum { + /** Static value None for NlpLearningRateScheduler. */ + public static final NlpLearningRateScheduler NONE = fromString("None"); + + /** Static value Linear for NlpLearningRateScheduler. */ + public static final NlpLearningRateScheduler LINEAR = fromString("Linear"); + + /** Static value Cosine for NlpLearningRateScheduler. */ + public static final NlpLearningRateScheduler COSINE = fromString("Cosine"); + + /** Static value CosineWithRestarts for NlpLearningRateScheduler. */ + public static final NlpLearningRateScheduler COSINE_WITH_RESTARTS = fromString("CosineWithRestarts"); + + /** Static value Polynomial for NlpLearningRateScheduler. */ + public static final NlpLearningRateScheduler POLYNOMIAL = fromString("Polynomial"); + + /** Static value Constant for NlpLearningRateScheduler. */ + public static final NlpLearningRateScheduler CONSTANT = fromString("Constant"); + + /** Static value ConstantWithWarmup for NlpLearningRateScheduler. */ + public static final NlpLearningRateScheduler CONSTANT_WITH_WARMUP = fromString("ConstantWithWarmup"); + + /** + * Creates or finds a NlpLearningRateScheduler from its string representation. + * + * @param name a name to look for. + * @return the corresponding NlpLearningRateScheduler. + */ + @JsonCreator + public static NlpLearningRateScheduler fromString(String name) { + return fromString(name, NlpLearningRateScheduler.class); + } + + /** + * Gets known NlpLearningRateScheduler values. + * + * @return known NlpLearningRateScheduler values. + */ + public static Collection values() { + return values(NlpLearningRateScheduler.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpParameterSubspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpParameterSubspace.java new file mode 100644 index 000000000000..13eab77e16ab --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpParameterSubspace.java @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Stringified search spaces for each parameter. See below examples. */ +@Fluent +public final class NlpParameterSubspace { + /* + * Number of steps to accumulate gradients over before running a backward pass. + */ + @JsonProperty(value = "gradientAccumulationSteps") + private String gradientAccumulationSteps; + + /* + * The learning rate for the training procedure. + */ + @JsonProperty(value = "learningRate") + private String learningRate; + + /* + * The type of learning rate schedule to use during the training procedure. + */ + @JsonProperty(value = "learningRateScheduler") + private String learningRateScheduler; + + /* + * The name of the model to train. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * Number of training epochs. + */ + @JsonProperty(value = "numberOfEpochs") + private String numberOfEpochs; + + /* + * The batch size for the training procedure. + */ + @JsonProperty(value = "trainingBatchSize") + private String trainingBatchSize; + + /* + * The batch size to be used during evaluation. + */ + @JsonProperty(value = "validationBatchSize") + private String validationBatchSize; + + /* + * The warmup ratio, used alongside LrSchedulerType. + */ + @JsonProperty(value = "warmupRatio") + private String warmupRatio; + + /* + * The weight decay for the training procedure. + */ + @JsonProperty(value = "weightDecay") + private String weightDecay; + + /** + * Get the gradientAccumulationSteps property: Number of steps to accumulate gradients over before running a + * backward pass. + * + * @return the gradientAccumulationSteps value. + */ + public String gradientAccumulationSteps() { + return this.gradientAccumulationSteps; + } + + /** + * Set the gradientAccumulationSteps property: Number of steps to accumulate gradients over before running a + * backward pass. + * + * @param gradientAccumulationSteps the gradientAccumulationSteps value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withGradientAccumulationSteps(String gradientAccumulationSteps) { + this.gradientAccumulationSteps = gradientAccumulationSteps; + return this; + } + + /** + * Get the learningRate property: The learning rate for the training procedure. + * + * @return the learningRate value. + */ + public String learningRate() { + return this.learningRate; + } + + /** + * Set the learningRate property: The learning rate for the training procedure. + * + * @param learningRate the learningRate value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withLearningRate(String learningRate) { + this.learningRate = learningRate; + return this; + } + + /** + * Get the learningRateScheduler property: The type of learning rate schedule to use during the training procedure. + * + * @return the learningRateScheduler value. + */ + public String learningRateScheduler() { + return this.learningRateScheduler; + } + + /** + * Set the learningRateScheduler property: The type of learning rate schedule to use during the training procedure. + * + * @param learningRateScheduler the learningRateScheduler value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withLearningRateScheduler(String learningRateScheduler) { + this.learningRateScheduler = learningRateScheduler; + return this; + } + + /** + * Get the modelName property: The name of the model to train. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model to train. + * + * @param modelName the modelName value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the numberOfEpochs property: Number of training epochs. + * + * @return the numberOfEpochs value. + */ + public String numberOfEpochs() { + return this.numberOfEpochs; + } + + /** + * Set the numberOfEpochs property: Number of training epochs. + * + * @param numberOfEpochs the numberOfEpochs value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withNumberOfEpochs(String numberOfEpochs) { + this.numberOfEpochs = numberOfEpochs; + return this; + } + + /** + * Get the trainingBatchSize property: The batch size for the training procedure. + * + * @return the trainingBatchSize value. + */ + public String trainingBatchSize() { + return this.trainingBatchSize; + } + + /** + * Set the trainingBatchSize property: The batch size for the training procedure. + * + * @param trainingBatchSize the trainingBatchSize value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withTrainingBatchSize(String trainingBatchSize) { + this.trainingBatchSize = trainingBatchSize; + return this; + } + + /** + * Get the validationBatchSize property: The batch size to be used during evaluation. + * + * @return the validationBatchSize value. + */ + public String validationBatchSize() { + return this.validationBatchSize; + } + + /** + * Set the validationBatchSize property: The batch size to be used during evaluation. + * + * @param validationBatchSize the validationBatchSize value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withValidationBatchSize(String validationBatchSize) { + this.validationBatchSize = validationBatchSize; + return this; + } + + /** + * Get the warmupRatio property: The warmup ratio, used alongside LrSchedulerType. + * + * @return the warmupRatio value. + */ + public String warmupRatio() { + return this.warmupRatio; + } + + /** + * Set the warmupRatio property: The warmup ratio, used alongside LrSchedulerType. + * + * @param warmupRatio the warmupRatio value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withWarmupRatio(String warmupRatio) { + this.warmupRatio = warmupRatio; + return this; + } + + /** + * Get the weightDecay property: The weight decay for the training procedure. + * + * @return the weightDecay value. + */ + public String weightDecay() { + return this.weightDecay; + } + + /** + * Set the weightDecay property: The weight decay for the training procedure. + * + * @param weightDecay the weightDecay value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withWeightDecay(String weightDecay) { + this.weightDecay = weightDecay; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpSweepSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpSweepSettings.java new file mode 100644 index 000000000000..838280437c65 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpSweepSettings.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Model sweeping and hyperparameter tuning related settings. */ +@Fluent +public final class NlpSweepSettings { + /* + * Type of early termination policy for the sweeping job. + */ + @JsonProperty(value = "earlyTermination") + private EarlyTerminationPolicy earlyTermination; + + /* + * [Required] Type of sampling algorithm. + */ + @JsonProperty(value = "samplingAlgorithm", required = true) + private SamplingAlgorithmType samplingAlgorithm; + + /** + * Get the earlyTermination property: Type of early termination policy for the sweeping job. + * + * @return the earlyTermination value. + */ + public EarlyTerminationPolicy earlyTermination() { + return this.earlyTermination; + } + + /** + * Set the earlyTermination property: Type of early termination policy for the sweeping job. + * + * @param earlyTermination the earlyTermination value to set. + * @return the NlpSweepSettings object itself. + */ + public NlpSweepSettings withEarlyTermination(EarlyTerminationPolicy earlyTermination) { + this.earlyTermination = earlyTermination; + return this; + } + + /** + * Get the samplingAlgorithm property: [Required] Type of sampling algorithm. + * + * @return the samplingAlgorithm value. + */ + public SamplingAlgorithmType samplingAlgorithm() { + return this.samplingAlgorithm; + } + + /** + * Set the samplingAlgorithm property: [Required] Type of sampling algorithm. + * + * @param samplingAlgorithm the samplingAlgorithm value to set. + * @return the NlpSweepSettings object itself. + */ + public NlpSweepSettings withSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithm) { + this.samplingAlgorithm = samplingAlgorithm; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (earlyTermination() != null) { + earlyTermination().validate(); + } + if (samplingAlgorithm() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property samplingAlgorithm in model NlpSweepSettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NlpSweepSettings.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java index 06d7e7163e89..c984f4b36f2e 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 @@ -6,47 +6,46 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** Abstract class for NLP related AutoML tasks. NLP - Natural Language Processing. */ @Fluent public class NlpVertical { - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - /* * Featurization inputs needed for AutoML job. */ @JsonProperty(value = "featurizationSettings") private NlpVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private NlpFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; - /** - * Get the dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. + /* + * Search space for sampling different combinations of models and their hyperparameters. */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } + @JsonProperty(value = "searchSpace") + private List searchSpace; - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the NlpVertical object itself. + /* + * Settings for model sweeping and hyperparameter tuning. */ - public NlpVertical withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - return this; - } + @JsonProperty(value = "sweepSettings") + private NlpSweepSettings sweepSettings; + + /* + * Validation data inputs. + */ + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. @@ -68,6 +67,26 @@ public NlpVertical withFeaturizationSettings(NlpVerticalFeaturizationSettings fe return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public NlpFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the NlpVertical object itself. + */ + public NlpVertical withFixedParameters(NlpFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. * @@ -88,20 +107,91 @@ public NlpVertical withLimitSettings(NlpVerticalLimitSettings limitSettings) { return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the NlpVertical object itself. + */ + public NlpVertical withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public NlpSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the NlpVertical object itself. + */ + public NlpVertical withSweepSettings(NlpSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + + /** + * Get the validationData property: Validation data inputs. + * + * @return the validationData value. + */ + public MLTableJobInput validationData() { + return this.validationData; + } + + /** + * Set the validationData property: Validation data inputs. + * + * @param validationData the validationData value to set. + * @return the 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 (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().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 a8541602826c..000000000000 --- 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/NlpVerticalLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java index 9f7214537ae0..4356577ace85 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java @@ -17,6 +17,12 @@ public final class NlpVerticalLimitSettings { @JsonProperty(value = "maxConcurrentTrials") private Integer maxConcurrentTrials; + /* + * Maximum nodes to leverage for training in any single trial. Controls multi-node distributed training. + */ + @JsonProperty(value = "maxNodes") + private Integer maxNodes; + /* * Number of AutoML iterations. */ @@ -29,6 +35,12 @@ public final class NlpVerticalLimitSettings { @JsonProperty(value = "timeout") private Duration timeout; + /* + * Timeout for individual HD trials. + */ + @JsonProperty(value = "trialTimeout") + private Duration trialTimeout; + /** * Get the maxConcurrentTrials property: Maximum Concurrent AutoML iterations. * @@ -49,6 +61,28 @@ public NlpVerticalLimitSettings withMaxConcurrentTrials(Integer maxConcurrentTri return this; } + /** + * Get the maxNodes property: Maximum nodes to leverage for training in any single trial. Controls multi-node + * distributed training. + * + * @return the maxNodes value. + */ + public Integer maxNodes() { + return this.maxNodes; + } + + /** + * Set the maxNodes property: Maximum nodes to leverage for training in any single trial. Controls multi-node + * distributed training. + * + * @param maxNodes the maxNodes value to set. + * @return the NlpVerticalLimitSettings object itself. + */ + public NlpVerticalLimitSettings withMaxNodes(Integer maxNodes) { + this.maxNodes = maxNodes; + return this; + } + /** * Get the maxTrials property: Number of AutoML iterations. * @@ -89,6 +123,26 @@ public NlpVerticalLimitSettings withTimeout(Duration timeout) { return this; } + /** + * Get the trialTimeout property: Timeout for individual HD trials. + * + * @return the trialTimeout value. + */ + public Duration trialTimeout() { + return this.trialTimeout; + } + + /** + * Set the trialTimeout property: Timeout for individual HD trials. + * + * @param trialTimeout the trialTimeout value to set. + * @return the NlpVerticalLimitSettings object itself. + */ + public NlpVerticalLimitSettings withTrialTimeout(Duration trialTimeout) { + this.trialTimeout = trialTimeout; + return this; + } + /** * Validates the instance. * 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 83a16977dc67..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalValidationDataSettings.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; - -/** The NlpVerticalValidationDataSettings model. */ -@Fluent -public final class NlpVerticalValidationDataSettings extends ValidationDataSettings { - /** {@inheritDoc} */ - @Override - public NlpVerticalValidationDataSettings withData(MLTableJobInput data) { - super.withData(data); - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalValidationDataSettings withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java index 550b074c0ea4..19bf3187c0de 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NodeState. */ +/** State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. */ public final class NodeState extends ExpandableStringEnum { /** Static value idle for NodeState. */ public static final NodeState IDLE = fromString("idle"); 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 d2c75d39b07e..cb88386a758a 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/Nodes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java new file mode 100644 index 000000000000..3e921bf0943e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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; + +/** Abstract Nodes definition. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "nodesValueType", + defaultImpl = Nodes.class) +@JsonTypeName("Nodes") +@JsonSubTypes({@JsonSubTypes.Type(name = "All", value = AllNodes.class)}) +@Immutable +public class Nodes { + /** + * 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/NodesValueType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java new file mode 100644 index 000000000000..68fcdfd58068 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.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; + +/** The enumerated types for the nodes value. */ +public final class NodesValueType extends ExpandableStringEnum { + /** Static value All for NodesValueType. */ + public static final NodesValueType ALL = fromString("All"); + + /** Static value Custom for NodesValueType. */ + public static final NodesValueType CUSTOM = fromString("Custom"); + + /** + * Creates or finds a NodesValueType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodesValueType. + */ + @JsonCreator + public static NodesValueType fromString(String name) { + return fromString(name, NodesValueType.class); + } + + /** + * Gets known NodesValueType values. + * + * @return known NodesValueType values. + */ + public static Collection values() { + return values(NodesValueType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java new file mode 100644 index 000000000000..f831819883e0 --- /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(String 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/ObjectDetectionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java index 6f03bf08a710..a24508ebdd46 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ObjectDetectionPrimaryMetrics. */ +/** Primary metrics for Image ObjectDetection task. */ public final class ObjectDetectionPrimaryMetrics extends ExpandableStringEnum { /** Static value MeanAveragePrecision for ObjectDetectionPrimaryMetrics. */ public static final ObjectDetectionPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); 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 d8007d460272..fa2f7df17b37 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 d8bf089ea113..474a65829f3d 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 7f21e01700a7..c45ff88e4eaf 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 375af4784d66..aa430cec1592 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 5cb8231f3265..b109d3d534c8 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 0a1fe192ca99..ab553321c4c5 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 25853197fcef..4729670e924d 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 0ee0b7d4d564..2e3cebaf1fb0 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 e5922f656be8..e8c6f1ba057e 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/OperatingSystemType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java index 544a3dfe9094..7ab1b0820822 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OperatingSystemType. */ +/** The type of operating system. */ public final class OperatingSystemType extends ExpandableStringEnum { /** Static value Linux for OperatingSystemType. */ public static final OperatingSystemType LINUX = fromString("Linux"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java index dd28866ba0ab..5213c475b9cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OperationName. */ +/** Name of the last operation. */ public final class OperationName extends ExpandableStringEnum { /** Static value Create for OperationName. */ public static final OperationName CREATE = fromString("Create"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java index 055e4bab127c..9370e6f3fb09 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OperationStatus. */ +/** Operation status. */ public final class OperationStatus extends ExpandableStringEnum { /** Static value InProgress for OperationStatus. */ public static final OperationStatus IN_PROGRESS = fromString("InProgress"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java index 09f86acd5ac2..36b7b302edfa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OperationTrigger. */ +/** Trigger of operation. */ public final class OperationTrigger extends ExpandableStringEnum { /** Static value User for OperationTrigger. */ public static final OperationTrigger USER = fromString("User"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java index d718ecc7e6d5..8a1fe4495a71 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java @@ -10,7 +10,7 @@ /** Resource collection API of Operations. */ public interface Operations { /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -20,7 +20,7 @@ public interface Operations { PagedIterable list(); /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Services REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java index 34f1e0c661dd..1512e368b15c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OsType. */ +/** Compute OS Type. */ public final class OsType extends ExpandableStringEnum { /** Static value Linux for OsType. */ public static final OsType LINUX = fromString("Linux"); 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 3bb10862ed2b..1a256af14434 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OutputDeliveryMode. */ +/** Output data delivery mode enums. */ public final class OutputDeliveryMode extends ExpandableStringEnum { /** Static value ReadWriteMount for OutputDeliveryMode. */ public static final OutputDeliveryMode READ_WRITE_MOUNT = fromString("ReadWriteMount"); @@ -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 7f3588eac7d4..dfe6076253e1 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 000000000000..ad45c0752690 --- /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 3dfbe96a2c64..000000000000 --- 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 5fbe738f6cb2..000000000000 --- 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/PartialBatchRetrySettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchRetrySettings.java deleted file mode 100644 index f61f00edfae6..000000000000 --- 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 26cc403e2ee0..000000000000 --- 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 7e09d678dd30..000000000000 --- 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 5803b53593f5..000000000000 --- 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 f10c6d4cb8f9..1f7a26096cc0 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 000000000000..9a7ad6bdd8c2 --- /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 000000000000..30217ff42eab --- /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 000000000000..19a448c89715 --- /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 59b0439ec0fd..000000000000 --- 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 ef3e28340fa1..000000000000 --- 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 48295e01bb07..000000000000 --- 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 4490ec8d69e1..000000000000 --- 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/PartialBatchEndpointPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java similarity index 66% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpointPartialTrackedResource.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java index be8529d9ae5b..f806fb2fb630 100644 --- 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/PartialRegistryPartialTrackedResource.java @@ -11,32 +11,24 @@ /** Strictly used in update requests. */ @Fluent -public final class PartialBatchEndpointPartialTrackedResource { +public final class PartialRegistryPartialTrackedResource { /* - * Managed service identity (system assigned and/or user assigned - * identities) + * 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. + * 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; + private Object properties; /* * Sku details required for ARM contract for Autoscaling. @@ -64,9 +56,9 @@ public PartialManagedServiceIdentity 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. + * @return the PartialRegistryPartialTrackedResource object itself. */ - public PartialBatchEndpointPartialTrackedResource withIdentity(PartialManagedServiceIdentity identity) { + public PartialRegistryPartialTrackedResource withIdentity(PartialManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -86,39 +78,19 @@ public String kind() { * the same type. * * @param kind the kind value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. + * @return the PartialRegistryPartialTrackedResource object itself. */ - public PartialBatchEndpointPartialTrackedResource withKind(String kind) { + public PartialRegistryPartialTrackedResource 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() { + public Object properties() { return this.properties; } @@ -126,9 +98,9 @@ public PartialBatchEndpoint properties() { * Set the properties property: Additional attributes of the entity. * * @param properties the properties value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. + * @return the PartialRegistryPartialTrackedResource object itself. */ - public PartialBatchEndpointPartialTrackedResource withProperties(PartialBatchEndpoint properties) { + public PartialRegistryPartialTrackedResource withProperties(Object properties) { this.properties = properties; return this; } @@ -146,9 +118,9 @@ public PartialSku 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. + * @return the PartialRegistryPartialTrackedResource object itself. */ - public PartialBatchEndpointPartialTrackedResource withSku(PartialSku sku) { + public PartialRegistryPartialTrackedResource withSku(PartialSku sku) { this.sku = sku; return this; } @@ -166,9 +138,9 @@ public Map tags() { * Set the tags property: Resource tags. * * @param tags the tags value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. + * @return the PartialRegistryPartialTrackedResource object itself. */ - public PartialBatchEndpointPartialTrackedResource withTags(Map tags) { + public PartialRegistryPartialTrackedResource withTags(Map tags) { this.tags = tags; return this; } @@ -182,9 +154,6 @@ 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/PartialSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java index fc9c44c763dc..375c428cf1dc 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 000000000000..d346185ada20 --- /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(String 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 9ac31138c113..7581dfd3c4aa 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/PrivateEndpointConnectionProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java index 2bf3e7aa6030..99b576e1e7a0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateEndpointConnectionProvisioningState. */ +/** The current provisioning state. */ public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java index a4e680c597f1..ceb464f61a1d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateEndpointServiceConnectionStatus. */ +/** The private endpoint connection status. */ public final class PrivateEndpointServiceConnectionStatus extends ExpandableStringEnum { /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ 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 2be7efc23225..e048acab7ef8 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 874e638188c9..e521550f445d 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 000000000000..c86df2683fbf --- /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 000000000000..486388328b85 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under 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; + +/** + * Endpoint Communication Protocol + * + *

Protocol over which communication will happen over this endpoint. + */ +public final class Protocol extends ExpandableStringEnum { + /** Static value tcp for Protocol. */ + public static final Protocol TCP = fromString("tcp"); + + /** Static value udp for Protocol. */ + public static final Protocol UDP = fromString("udp"); + + /** Static value http for Protocol. */ + public static final Protocol HTTP = fromString("http"); + + /** + * Creates 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 0aceba0fd7c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProvisioningState. */ -public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Unknown for ProvisioningState. */ - public static final ProvisioningState UNKNOWN = fromString("Unknown"); - - /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = fromString("Updating"); - - /** Static value Creating for ProvisioningState. */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = fromString("Deleting"); - - /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for ProvisioningState. */ - public static final ProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - @JsonCreator - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); - } - - /** - * Gets known ProvisioningState values. - * - * @return known ProvisioningState values. - */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java index 935dc806316e..ad64177a6163 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProvisioningStatus. */ +/** The current deployment state of schedule. */ public final class ProvisioningStatus extends ExpandableStringEnum { /** Static value Completed for ProvisioningStatus. */ public static final ProvisioningStatus COMPLETED = fromString("Completed"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java index 522621f6f32f..afc191ec971f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PublicNetworkAccess. */ +/** Whether requests from Public Network are allowed. */ public final class PublicNetworkAccess extends ExpandableStringEnum { /** Static value Enabled for PublicNetworkAccess. */ public static final PublicNetworkAccess ENABLED = fromString("Enabled"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java index 80a26f8ee788..70f65ef2e98e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PublicNetworkAccessType. */ +/** Enum to determine whether PublicNetworkAccess is Enabled or Disabled. */ public final class PublicNetworkAccessType extends ExpandableStringEnum { /** Static value Enabled for PublicNetworkAccessType. */ public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); 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 8735c29e120f..ac1b21307aec 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/QuotaUnit.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java index 4f312f7f7e96..75c66bb68bc1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for QuotaUnit. */ +/** An enum describing the unit of quota measurement. */ public final class QuotaUnit extends ExpandableStringEnum { /** Static value Count for QuotaUnit. */ public static final QuotaUnit COUNT = fromString("Count"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java index db3dffa7f7ee..3a11ca339ac9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RandomSamplingAlgorithmRule. */ +/** The specific type of random algorithm. */ public final class RandomSamplingAlgorithmRule extends ExpandableStringEnum { /** Static value Random for RandomSamplingAlgorithmRule. */ public static final RandomSamplingAlgorithmRule RANDOM = fromString("Random"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java new file mode 100644 index 000000000000..bf4e71488b00 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 workflow trigger recurrence for ComputeStartStop schedule type. */ +@Fluent +public final class Recurrence { + /* + * [Required] The frequency to trigger schedule. + */ + @JsonProperty(value = "frequency") + private RecurrenceFrequency frequency; + + /* + * [Required] Specifies schedule interval in conjunction with frequency + */ + @JsonProperty(value = "interval") + private Integer interval; + + /* + * The start time in yyyy-MM-ddTHH:mm:ss format. + */ + @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; + + /* + * [Required] The recurrence schedule. + */ + @JsonProperty(value = "schedule") + 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 Recurrence object itself. + */ + public Recurrence 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 Integer interval() { + return this.interval; + } + + /** + * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * + * @param interval the interval value to set. + * @return the Recurrence object itself. + */ + public Recurrence withInterval(Integer interval) { + this.interval = interval; + return this; + } + + /** + * Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @param startTime the startTime value to set. + * @return the Recurrence object itself. + */ + public Recurrence withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @param timeZone the timeZone value to set. + * @return the Recurrence object itself. + */ + public Recurrence withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the schedule property: [Required] The recurrence schedule. + * + * @return the schedule value. + */ + public RecurrenceSchedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: [Required] The recurrence schedule. + * + * @param schedule the schedule value to set. + * @return the Recurrence object itself. + */ + public Recurrence withSchedule(RecurrenceSchedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (schedule() != null) { + schedule().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java index 21ae5bf2d756..dd18cdb3df8d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RecurrenceFrequency. */ +/** Enum to describe the frequency of a recurrence schedule. */ public final class RecurrenceFrequency extends ExpandableStringEnum { /** Static value Minute for RecurrenceFrequency. */ public static final RecurrenceFrequency MINUTE = fromString("Minute"); 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 68c3a5db6688..000000000000 --- 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 791c35fc149d..aedb8c7bcdb1 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,112 @@ 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 month days for the schedule */ - @JsonProperty(value = "pattern") - private RecurrencePattern pattern; + @JsonProperty(value = "monthDays") + private List monthDays; + + /* + * List of days for the schedule. + */ + @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 monthDays property: List of month days for the schedule. * - * @return the pattern value. + * @return the monthDays value. */ - public RecurrencePattern pattern() { - return this.pattern; + public List monthDays() { + return this.monthDays; } /** - * Set the pattern property: Specifies the recurrence schedule pattern. + * Set the monthDays property: List of month days for the schedule. * - * @param pattern the pattern value to set. + * @param monthDays the monthDays 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); + public RecurrenceSchedule withMonthDays(List monthDays) { + this.monthDays = monthDays; 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; + /** + * Get the weekDays property: List of days for the schedule. + * + * @return the weekDays value. + */ + public List weekDays() { + return this.weekDays; } - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withTimeZone(String timeZone) { - super.withTimeZone(timeZone); + /** + * Set the weekDays property: List of days for the schedule. + * + * @param weekDays the weekDays value to set. + * @return the RecurrenceSchedule object itself. + */ + public RecurrenceSchedule withWeekDays(List weekDays) { + this.weekDays = weekDays; return this; } @@ -127,16 +121,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 000000000000..86427b37011b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The RecurrenceTrigger model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType") +@JsonTypeName("Recurrence") +@Fluent +public final class RecurrenceTrigger extends TriggerBase { + /* + * [Required] The frequency to trigger schedule. + */ + @JsonProperty(value = "frequency", required = true) + private RecurrenceFrequency frequency; + + /* + * [Required] Specifies schedule interval in conjunction with frequency + */ + @JsonProperty(value = "interval", required = true) + private int interval; + + /* + * The recurrence schedule. + */ + @JsonProperty(value = "schedule") + private RecurrenceSchedule schedule; + + /** + * Get the frequency property: [Required] The frequency to trigger schedule. + * + * @return the frequency value. + */ + public RecurrenceFrequency frequency() { + return this.frequency; + } + + /** + * Set the frequency property: [Required] The frequency to trigger schedule. + * + * @param frequency the frequency value to set. + * @return the RecurrenceTrigger object itself. + */ + public RecurrenceTrigger withFrequency(RecurrenceFrequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * + * @return the interval value. + */ + public int interval() { + return this.interval; + } + + /** + * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * + * @param interval the interval value to set. + * @return the RecurrenceTrigger object itself. + */ + public RecurrenceTrigger withInterval(int interval) { + this.interval = interval; + return this; + } + + /** + * Get the schedule property: The recurrence schedule. + * + * @return the schedule value. + */ + public RecurrenceSchedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: The recurrence schedule. + * + * @param schedule the schedule value to set. + * @return the RecurrenceTrigger object itself. + */ + public RecurrenceTrigger withSchedule(RecurrenceSchedule schedule) { + this.schedule = schedule; + return this; + } + + /** {@inheritDoc} */ + @Override + public RecurrenceTrigger withEndTime(String endTime) { + super.withEndTime(endTime); + return this; + } + + /** {@inheritDoc} */ + @Override + public RecurrenceTrigger withStartTime(String startTime) { + super.withStartTime(startTime); + return this; + } + + /** {@inheritDoc} */ + @Override + public RecurrenceTrigger withTimeZone(String timeZone) { + super.withTimeZone(timeZone); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (frequency() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property frequency in model RecurrenceTrigger")); + } + if (schedule() != null) { + schedule().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RecurrenceTrigger.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java index ebfd2974be4a..c035556360df 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ReferenceType. */ +/** Enum to determine which reference method to use for an asset. */ public final class ReferenceType extends ExpandableStringEnum { /** Static value Id for ReferenceType. */ public static final ReferenceType ID = fromString("Id"); 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 e75663190cd8..86107e6a8d50 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/Registries.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java new file mode 100644 index 000000000000..60a19c9d0164 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights 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 Registries. */ +public interface Registries { + /** + * List registries by subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List registries by subscription. + * + * @param 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 Registry entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String skip, Context context); + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List registries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param 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 Registry entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String registryName); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String registryName, Context context); + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry. + */ + Registry getByResourceGroup(String resourceGroupName, String registryName); + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, Context context); + + /** + * Get registry. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry along with {@link Response}. + */ + Registry getById(String id); + + /** + * Get registry. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete registry. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete registry. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Registry resource. + * + * @param name resource name. + * @return the first stage of the new Registry definition. + */ + Registry.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java similarity index 74% 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/Registry.java index 71c6cb57ca7a..9504f9e9ce41 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/Registry.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.RegistryInner; import java.util.Map; -/** An immutable client-side representation of BatchDeploymentData. */ -public interface BatchDeploymentData { +/** An immutable client-side representation of Registry. */ +public interface Registry { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -67,7 +67,7 @@ public interface BatchDeploymentData { * * @return the properties value. */ - BatchDeploymentDetails properties(); + RegistryProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -105,26 +105,26 @@ 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.RegistryInner object. * * @return the inner object. */ - BatchDeploymentDataInner innerModel(); + RegistryInner innerModel(); - /** The entirety of the BatchDeploymentData definition. */ + /** The entirety of the Registry definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The BatchDeploymentData definition stages. */ + /** The Registry definition stages. */ interface DefinitionStages { - /** The first stage of the BatchDeploymentData definition. */ + /** The first stage of the Registry definition. */ interface Blank extends WithLocation { } - /** The stage of the BatchDeploymentData definition allowing to specify location. */ + /** The stage of the Registry definition allowing to specify location. */ interface WithLocation { /** * Specifies the region for the resource. @@ -132,7 +132,7 @@ interface WithLocation { * @param location The geo-location where the resource lives. * @return the next definition stage. */ - WithParentResource withRegion(Region location); + WithResourceGroup withRegion(Region location); /** * Specifies the region for the resource. @@ -140,22 +140,19 @@ interface WithLocation { * @param location The geo-location where the resource lives. * @return the next definition stage. */ - WithParentResource withRegion(String location); + WithResourceGroup withRegion(String location); } - /** The stage of the BatchDeploymentData definition allowing to specify parent resource. */ - interface WithParentResource { + /** The stage of the Registry definition allowing to specify parent resource. */ + interface WithResourceGroup { /** - * Specifies resourceGroupName, workspaceName, endpointName. + * Specifies resourceGroupName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. * @return the next definition stage. */ - WithProperties withExistingBatchEndpoint( - String resourceGroupName, String workspaceName, String endpointName); + WithProperties withExistingResourceGroup(String resourceGroupName); } - /** The stage of the BatchDeploymentData definition allowing to specify properties. */ + /** The stage of the Registry definition allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: [Required] Additional attributes of the entity.. @@ -163,11 +160,11 @@ interface WithProperties { * @param properties [Required] Additional attributes of the entity. * @return the next definition stage. */ - WithCreate withProperties(BatchDeploymentDetails properties); + WithCreate withProperties(RegistryProperties properties); } /** - * The stage of the BatchDeploymentData definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * The stage of the Registry definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithTags, @@ -179,7 +176,7 @@ interface WithCreate * * @return the created resource. */ - BatchDeploymentData create(); + Registry create(); /** * Executes the create request. @@ -187,9 +184,9 @@ interface WithCreate * @param context The context to associate with this operation. * @return the created resource. */ - BatchDeploymentData create(Context context); + Registry create(Context context); } - /** The stage of the BatchDeploymentData definition allowing to specify tags. */ + /** The stage of the Registry definition allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -199,7 +196,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the BatchDeploymentData definition allowing to specify identity. */ + /** The stage of the Registry definition allowing to specify identity. */ interface WithIdentity { /** * Specifies the identity property: Managed service identity (system assigned and/or user assigned @@ -210,7 +207,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the BatchDeploymentData definition allowing to specify kind. */ + /** The stage of the Registry definition allowing to specify kind. */ interface WithKind { /** * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for @@ -222,7 +219,7 @@ interface WithKind { */ WithCreate withKind(String kind); } - /** The stage of the BatchDeploymentData definition allowing to specify sku. */ + /** The stage of the Registry definition allowing to specify sku. */ interface WithSku { /** * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. @@ -234,13 +231,13 @@ interface WithSku { } } /** - * Begins update for the BatchDeploymentData resource. + * Begins update for the Registry resource. * * @return the stage of resource update. */ - BatchDeploymentData.Update update(); + Registry.Update update(); - /** The template for BatchDeploymentData update. */ + /** The template for Registry update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, @@ -252,7 +249,7 @@ interface Update * * @return the updated resource. */ - BatchDeploymentData apply(); + Registry apply(); /** * Executes the update request. @@ -260,11 +257,11 @@ interface Update * @param context The context to associate with this operation. * @return the updated resource. */ - BatchDeploymentData apply(Context context); + Registry apply(Context context); } - /** The BatchDeploymentData update stages. */ + /** The Registry update stages. */ interface UpdateStages { - /** The stage of the BatchDeploymentData update allowing to specify tags. */ + /** The stage of the Registry update allowing to specify tags. */ interface WithTags { /** * Specifies the tags property: Resource tags.. @@ -274,7 +271,7 @@ interface WithTags { */ Update withTags(Map tags); } - /** The stage of the BatchDeploymentData update allowing to specify identity. */ + /** The stage of the Registry update allowing to specify identity. */ interface WithIdentity { /** * Specifies the identity property: Managed service identity (system assigned and/or user assigned @@ -285,7 +282,7 @@ interface WithIdentity { */ Update withIdentity(PartialManagedServiceIdentity identity); } - /** The stage of the BatchDeploymentData update allowing to specify kind. */ + /** The stage of the Registry update allowing to specify kind. */ interface WithKind { /** * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for @@ -297,7 +294,7 @@ interface WithKind { */ Update withKind(String kind); } - /** The stage of the BatchDeploymentData update allowing to specify properties. */ + /** The stage of the Registry update allowing to specify properties. */ interface WithProperties { /** * Specifies the properties property: Additional attributes of the entity.. @@ -305,9 +302,9 @@ interface WithProperties { * @param properties Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(PartialBatchDeployment properties); + Update withProperties(Object properties); } - /** The stage of the BatchDeploymentData update allowing to specify sku. */ + /** The stage of the Registry update allowing to specify sku. */ interface WithSku { /** * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. @@ -323,7 +320,7 @@ interface WithSku { * * @return the refreshed resource. */ - BatchDeploymentData refresh(); + Registry refresh(); /** * Refreshes the resource to sync with Azure. @@ -331,5 +328,5 @@ interface WithSku { * @param context The context to associate with this operation. * @return the refreshed resource. */ - BatchDeploymentData refresh(Context context); + Registry refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java new file mode 100644 index 000000000000..56c54063dd29 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights 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 RegistryCodeContainers. */ +public interface RegistryCodeContainers { + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String codeName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String codeName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + CodeContainer get(String resourceGroupName, String registryName, String codeName); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context); + + /** + * Get container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + CodeContainer getById(String id); + + /** + * Get container. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CodeContainer resource. + * + * @param name resource name. + * @return the first stage of the new CodeContainer definition. + */ + CodeContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java new file mode 100644 index 000000000000..f3c3824207b0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights 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 RegistryCodeVersions. */ +public interface RegistryCodeVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String codeName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String codeName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + CodeVersion get(String resourceGroupName, String registryName, String codeName, String version); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + CodeVersion getById(String id); + + /** + * Get version. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CodeVersion resource. + * + * @param name resource name. + * @return the first stage of the new CodeVersion definition. + */ + CodeVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java new file mode 100644 index 000000000000..1d36c17e8373 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights 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 RegistryComponentContainers. */ +public interface RegistryComponentContainers { + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String componentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + ComponentContainer get(String resourceGroupName, String registryName, String componentName); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Get container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + ComponentContainer getById(String id); + + /** + * Get container. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ComponentContainer resource. + * + * @param name resource name. + * @return the first stage of the new ComponentContainer definition. + */ + ComponentContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java new file mode 100644 index 000000000000..438b02b96820 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights 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 RegistryComponentVersions. */ +public interface RegistryComponentVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String componentName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String componentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + ComponentVersion getById(String id); + + /** + * Get version. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ComponentVersion resource. + * + * @param name resource name. + * @return the first stage of the new ComponentVersion definition. + */ + ComponentVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java new file mode 100644 index 000000000000..10ca9d392361 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights 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 RegistryEnvironmentContainers. */ +public interface RegistryEnvironmentContainers { + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String environmentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + EnvironmentContainer getById(String id); + + /** + * Get container. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EnvironmentContainer resource. + * + * @param name resource name. + * @return the first stage of the new EnvironmentContainer definition. + */ + EnvironmentContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java new file mode 100644 index 000000000000..a2d4d08f495e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights 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 RegistryEnvironmentVersions. */ +public interface RegistryEnvironmentVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String environmentName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String environmentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + EnvironmentVersion get(String resourceGroupName, String registryName, String environmentName, String version); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + EnvironmentVersion getById(String id); + + /** + * Get version. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EnvironmentVersion resource. + * + * @param name resource name. + * @return the first stage of the new EnvironmentVersion definition. + */ + EnvironmentVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java new file mode 100644 index 000000000000..6ae54ab5c3a3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights 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 RegistryModelContainers. */ +public interface RegistryModelContainers { + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String modelName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + ModelContainer get(String resourceGroupName, String registryName, String modelName); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Get container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + ModelContainer getById(String id); + + /** + * Get container. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ModelContainer resource. + * + * @param name resource name. + * @return the first stage of the new ModelContainer definition. + */ + ModelContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java new file mode 100644 index 000000000000..e4756e0f6e4a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights 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 RegistryModelVersions. */ +public interface RegistryModelVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String modelName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String modelName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + ModelVersion get(String resourceGroupName, String registryName, String modelName, String version); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + ModelVersion getById(String id); + + /** + * Get version. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ModelVersion resource. + * + * @param name resource name. + * @return the first stage of the new ModelVersion definition. + */ + ModelVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryProperties.java new file mode 100644 index 000000000000..f652d0fd3dfd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryProperties.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; +import java.util.Map; + +/** Details of the Registry. */ +@Fluent +public final class RegistryProperties extends ResourceBase { + /* + * The publicNetworkAccess property. + */ + @JsonProperty(value = "publicNetworkAccess") + private String publicNetworkAccess; + + /* + * The discoveryUrl property. + */ + @JsonProperty(value = "discoveryUrl") + private String discoveryUrl; + + /* + * The intellectualPropertyPublisher property. + */ + @JsonProperty(value = "intellectualPropertyPublisher") + private String intellectualPropertyPublisher; + + /* + * Managed resource group created for the registry + */ + @JsonProperty(value = "managedResourceGroup") + private ArmResourceId managedResourceGroup; + + /* + * The mlFlowRegistryUri property. + */ + @JsonProperty(value = "mlFlowRegistryUri") + private String mlFlowRegistryUri; + + /* + * The privateLinkCount property. + */ + @JsonProperty(value = "privateLinkCount") + private Integer privateLinkCount; + + /* + * Details of each region the registry is in + */ + @JsonProperty(value = "regionDetails") + private List regionDetails; + + /** + * Get the publicNetworkAccess property: The publicNetworkAccess property. + * + * @return the publicNetworkAccess value. + */ + public String publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: The publicNetworkAccess property. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withPublicNetworkAccess(String publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the discoveryUrl property: The discoveryUrl property. + * + * @return the discoveryUrl value. + */ + public String discoveryUrl() { + return this.discoveryUrl; + } + + /** + * Set the discoveryUrl property: The discoveryUrl property. + * + * @param discoveryUrl the discoveryUrl value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withDiscoveryUrl(String discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + /** + * Get the intellectualPropertyPublisher property: The intellectualPropertyPublisher property. + * + * @return the intellectualPropertyPublisher value. + */ + public String intellectualPropertyPublisher() { + return this.intellectualPropertyPublisher; + } + + /** + * Set the intellectualPropertyPublisher property: The intellectualPropertyPublisher property. + * + * @param intellectualPropertyPublisher the intellectualPropertyPublisher value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withIntellectualPropertyPublisher(String intellectualPropertyPublisher) { + this.intellectualPropertyPublisher = intellectualPropertyPublisher; + return this; + } + + /** + * Get the managedResourceGroup property: Managed resource group created for the registry. + * + * @return the managedResourceGroup value. + */ + public ArmResourceId managedResourceGroup() { + return this.managedResourceGroup; + } + + /** + * Set the managedResourceGroup property: Managed resource group created for the registry. + * + * @param managedResourceGroup the managedResourceGroup value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withManagedResourceGroup(ArmResourceId managedResourceGroup) { + this.managedResourceGroup = managedResourceGroup; + return this; + } + + /** + * Get the mlFlowRegistryUri property: The mlFlowRegistryUri property. + * + * @return the mlFlowRegistryUri value. + */ + public String mlFlowRegistryUri() { + return this.mlFlowRegistryUri; + } + + /** + * Set the mlFlowRegistryUri property: The mlFlowRegistryUri property. + * + * @param mlFlowRegistryUri the mlFlowRegistryUri value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withMlFlowRegistryUri(String mlFlowRegistryUri) { + this.mlFlowRegistryUri = mlFlowRegistryUri; + return this; + } + + /** + * Get the privateLinkCount property: The privateLinkCount property. + * + * @return the privateLinkCount value. + */ + public Integer privateLinkCount() { + return this.privateLinkCount; + } + + /** + * Set the privateLinkCount property: The privateLinkCount property. + * + * @param privateLinkCount the privateLinkCount value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withPrivateLinkCount(Integer privateLinkCount) { + this.privateLinkCount = privateLinkCount; + return this; + } + + /** + * Get the regionDetails property: Details of each region the registry is in. + * + * @return the regionDetails value. + */ + public List regionDetails() { + return this.regionDetails; + } + + /** + * Set the regionDetails property: Details of each region the registry is in. + * + * @param regionDetails the regionDetails value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withRegionDetails(List regionDetails) { + this.regionDetails = regionDetails; + return this; + } + + /** {@inheritDoc} */ + @Override + public RegistryProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegistryProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegistryProperties 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 (managedResourceGroup() != null) { + managedResourceGroup().validate(); + } + if (regionDetails() != null) { + regionDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java new file mode 100644 index 000000000000..1ecb37094661 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + +/** Details for each region the registry is in. */ +@Fluent +public final class RegistryRegionArmDetails { + /* + * List of ACR accounts + */ + @JsonProperty(value = "acrDetails") + private List acrDetails; + + /* + * The location where the registry exists + */ + @JsonProperty(value = "location") + private String location; + + /* + * List of storage accounts + */ + @JsonProperty(value = "storageAccountDetails") + private List storageAccountDetails; + + /** + * Get the acrDetails property: List of ACR accounts. + * + * @return the acrDetails value. + */ + public List acrDetails() { + return this.acrDetails; + } + + /** + * Set the acrDetails property: List of ACR accounts. + * + * @param acrDetails the acrDetails value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withAcrDetails(List acrDetails) { + this.acrDetails = acrDetails; + return this; + } + + /** + * Get the location property: The location where the registry exists. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location where the registry exists. + * + * @param location the location value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the storageAccountDetails property: List of storage accounts. + * + * @return the storageAccountDetails value. + */ + public List storageAccountDetails() { + return this.storageAccountDetails; + } + + /** + * Set the storageAccountDetails property: List of storage accounts. + * + * @param storageAccountDetails the storageAccountDetails value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withStorageAccountDetails(List storageAccountDetails) { + this.storageAccountDetails = storageAccountDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (acrDetails() != null) { + acrDetails().forEach(e -> e.validate()); + } + if (storageAccountDetails() != null) { + storageAccountDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java new file mode 100644 index 000000000000..cd1b403976c5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT 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.RegistryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of Registry entities. */ +@Fluent +public final class RegistryTrackedResourceArmPaginatedResult { + /* + * The link to the next page of Registry objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type Registry. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the RegistryTrackedResourceArmPaginatedResult object itself. + */ + public RegistryTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type Registry. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type Registry. + * + * @param value the value value to set. + * @return the RegistryTrackedResourceArmPaginatedResult object itself. + */ + public RegistryTrackedResourceArmPaginatedResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} 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 c74055ad93d8..89aa774d88d4 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 = "trainingSettings") + private RegressionTrainingSettings trainingSettings; + + /* + * Columns to use for CVSplit data. */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; + @JsonProperty(value = "cvSplitColumnNames") + private List cvSplitColumnNames; /* * Featurization inputs needed for AutoML job. @@ -45,6 +39,12 @@ public final class Regression extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private TableVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private TableFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @@ -52,50 +52,58 @@ 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. + /* + * Search space for sampling different combinations of models and their hyperparameters. */ - public List allowedModels() { - return this.allowedModels; - } + @JsonProperty(value = "searchSpace") + private List searchSpace; - /** - * Set the allowedModels property: Allowed models for regression task. - * - * @param allowedModels the allowedModels value to set. - * @return the Regression object itself. + /* + * Settings for model sweeping and hyperparameter tuning. */ - public Regression withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } + @JsonProperty(value = "sweepSettings") + private TableSweepSettings sweepSettings; - /** - * Get the blockedModels property: Blocked models for regression task. - * - * @return the blockedModels value. + /* + * Test data input. */ - public List blockedModels() { - return this.blockedModels; - } + @JsonProperty(value = "testData") + private MLTableJobInput testData; - /** - * Set the blockedModels property: Blocked models for regression task. - * - * @param blockedModels the blockedModels 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 withBlockedModels(List blockedModels) { - this.blockedModels = blockedModels; - 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 primaryMetric property: Primary metric for regression task. @@ -118,22 +126,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; } @@ -157,6 +185,26 @@ public Regression withFeaturizationSettings(TableVerticalFeaturizationSettings f return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public TableFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the Regression object itself. + */ + public Regression withFixedParameters(TableFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. * @@ -178,22 +226,172 @@ 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 searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the Regression object itself. + */ + public Regression withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public TableSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the Regression object itself. + */ + public Regression withSweepSettings(TableSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + 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 +402,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,17 +424,32 @@ 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(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } - if (trainingSettings() != null) { - trainingSettings().validate(); + if (nCrossValidations() != null) { + nCrossValidations().validate(); + } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } + if (testData() != null) { + testData().validate(); + } + if (validationData() != null) { + validationData().validate(); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java index 7116f002cdee..024d4d9d119e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RegressionModels. */ +/** Enum for all Regression models supported by AutoML. */ public final class RegressionModels extends ExpandableStringEnum { /** Static value ElasticNet for RegressionModels. */ public static final RegressionModels ELASTIC_NET = fromString("ElasticNet"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java index cda7c0026ab7..ae6b6d17ec79 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RegressionPrimaryMetrics. */ +/** Primary metrics for Regression task. */ public final class RegressionPrimaryMetrics extends ExpandableStringEnum { /** Static value SpearmanCorrelation for RegressionPrimaryMetrics. */ public static final RegressionPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); 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 000000000000..d4db739dcc1d --- /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/RemoteLoginPortPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java index 08ff94bab2be..2fcdf93d3d55 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java @@ -8,7 +8,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RemoteLoginPortPublicAccess. */ +/** + * Close remote Login Access Port + * + *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all + * nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified + * - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all + * public nodes. It can be default only during cluster creation time, after creation it will be either enabled or + * disabled. + */ public final class RemoteLoginPortPublicAccess extends ExpandableStringEnum { /** Static value Enabled for RemoteLoginPortPublicAccess. */ public static final RemoteLoginPortPublicAccess ENABLED = fromString("Enabled"); 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 bb76bf3d21d1..a824d38ddfd7 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 a80079d702b5..107b099bcf5a 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 000000000000..f0739e21424a --- /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(String 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 723b1a70a088..71b27c681fca 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/CodeContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java similarity index 71% 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/Schedule.java index 9573580903bb..7808d864dab9 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/Schedule.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.ScheduleInner; -/** An immutable client-side representation of CodeContainerData. */ -public interface CodeContainerData { +/** An immutable client-side representation of Schedule. */ +public interface Schedule { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -36,7 +36,7 @@ public interface CodeContainerData { * * @return the properties value. */ - CodeContainerDetails properties(); + ScheduleProperties 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.ScheduleInner object. * * @return the inner object. */ - CodeContainerDataInner innerModel(); + ScheduleInner innerModel(); - /** The entirety of the CodeContainerData definition. */ + /** The entirety of the Schedule definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The CodeContainerData definition stages. */ + /** The Schedule definition stages. */ interface DefinitionStages { - /** The first stage of the CodeContainerData definition. */ + /** The first stage of the Schedule definition. */ interface Blank extends WithParentResource { } - /** The stage of the CodeContainerData definition allowing to specify parent resource. */ + /** The stage of the Schedule 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 Schedule 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(CodeContainerDetails properties); + WithCreate withProperties(ScheduleProperties properties); } /** - * The stage of the CodeContainerData definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * 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 { /** @@ -102,7 +102,7 @@ interface WithCreate { * * @return the created resource. */ - CodeContainerData create(); + Schedule 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); + Schedule create(Context context); } } /** - * Begins update for the CodeContainerData resource. + * Begins update for the Schedule resource. * * @return the stage of resource update. */ - CodeContainerData.Update update(); + Schedule.Update update(); - /** The template for CodeContainerData update. */ + /** The template for Schedule update. */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * * @return the updated resource. */ - CodeContainerData apply(); + Schedule 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); + Schedule apply(Context context); } - /** The CodeContainerData update stages. */ + /** The Schedule update stages. */ interface UpdateStages { - /** The stage of the CodeContainerData update allowing to specify properties. */ + /** The stage of the Schedule 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(ScheduleProperties properties); } } /** @@ -155,7 +155,7 @@ interface WithProperties { * * @return the refreshed resource. */ - CodeContainerData refresh(); + Schedule 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); + Schedule refresh(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java new file mode 100644 index 000000000000..1438d29d72c5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.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; + +/** The ScheduleActionBase model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "actionType", + defaultImpl = ScheduleActionBase.class) +@JsonTypeName("ScheduleActionBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "InvokeBatchEndpoint", value = EndpointScheduleAction.class), + @JsonSubTypes.Type(name = "CreateJob", value = JobScheduleAction.class) +}) +@Immutable +public class ScheduleActionBase { + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java new file mode 100644 index 000000000000..727cb62df9c5 --- /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 1dcf02015d2a..004199a495f2 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 + * A system assigned id for the schedule. */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; + @JsonProperty(value = "id") + private String id; /* - * Specifies the schedule's status + * The current deployment state of schedule. */ - @JsonProperty(value = "scheduleStatus") - private ScheduleStatus scheduleStatus; + @JsonProperty(value = "provisioningStatus") + private ScheduleProvisioningState provisioningStatus; /* - * Specifies start time of schedule in ISO 8601 format. + * Is the schedule enabled or disabled? */ - @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: A system assigned id for the schedule. * - * @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: A system assigned id for the schedule. * - * @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 current deployment state of schedule. * - * @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 current deployment state of schedule. * - * @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: Is the schedule enabled or disabled?. * - * @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: Is the schedule enabled or disabled?. * - * @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/ScheduleListViewType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java new file mode 100644 index 000000000000..fc32a49cf13e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.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 ScheduleListViewType. */ +public final class ScheduleListViewType extends ExpandableStringEnum { + /** Static value EnabledOnly for ScheduleListViewType. */ + public static final ScheduleListViewType ENABLED_ONLY = fromString("EnabledOnly"); + + /** Static value DisabledOnly for ScheduleListViewType. */ + public static final ScheduleListViewType DISABLED_ONLY = fromString("DisabledOnly"); + + /** Static value All for ScheduleListViewType. */ + public static final ScheduleListViewType ALL = fromString("All"); + + /** + * Creates or finds a ScheduleListViewType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScheduleListViewType. + */ + @JsonCreator + public static ScheduleListViewType fromString(String name) { + return fromString(name, ScheduleListViewType.class); + } + + /** + * Gets known ScheduleListViewType values. + * + * @return known ScheduleListViewType values. + */ + public static Collection values() { + return values(ScheduleListViewType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java new file mode 100644 index 000000000000..1435c1836a69 --- /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 000000000000..3a19c4979447 --- /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; + +/** The current deployment state of schedule. */ +public final class ScheduleProvisioningState extends ExpandableStringEnum { + /** Static value Completed for ScheduleProvisioningState. */ + public static final ScheduleProvisioningState COMPLETED = fromString("Completed"); + + /** Static value Provisioning for ScheduleProvisioningState. */ + public static final ScheduleProvisioningState PROVISIONING = fromString("Provisioning"); + + /** Static value Failed for ScheduleProvisioningState. */ + public static final ScheduleProvisioningState FAILED = fromString("Failed"); + + /** + * Creates 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 000000000000..8518418fc017 --- /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 91bcd2c2cfd8..6aaef660dd88 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/ScheduleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java index 92b11da22c9e..e7497666c1a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScheduleStatus. */ +/** Is the schedule enabled or disabled?. */ public final class ScheduleStatus extends ExpandableStringEnum { /** Static value Enabled for ScheduleStatus. */ public static final ScheduleStatus ENABLED = fromString("Enabled"); 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 d8e625b26711..000000000000 --- 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 000000000000..397728e00603 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Schedules. */ +public interface Schedules { + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List schedules in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + ScheduleListViewType listViewType, + Context context); + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String name); + + /** + * Delete schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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/SeasonalityMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java index d8225d3d3201..b17278d44264 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SeasonalityMode. */ +/** Forecasting seasonality mode. */ public final class SeasonalityMode extends ExpandableStringEnum { /** Static value Auto for SeasonalityMode. */ public static final SeasonalityMode AUTO = fromString("Auto"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java index 388b3554104f..7b163803317c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SecretsType. */ +/** Enum to determine the datastore secrets type. */ public final class SecretsType extends ExpandableStringEnum { /** Static value AccountKey for SecretsType. */ public static final SecretsType ACCOUNT_KEY = fromString("AccountKey"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java new file mode 100644 index 000000000000..cbecce44887a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.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 ServicePrincipalAuthTypeWorkspaceConnectionProperties model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("ServicePrincipal") +@Fluent +public final class ServicePrincipalAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionServicePrincipal credentials; + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionServicePrincipal credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the ServicePrincipalAuthTypeWorkspaceConnectionProperties object itself. + */ + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCredentials( + WorkspaceConnectionServicePrincipal credentials) { + this.credentials = credentials; + return this; + } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCategory(String category) { + super.withCategory(category); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValue(String value) { + super.withValue(value); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { + super.withValueFormat(valueFormat); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java index ef74acc66917..6070b95ece58 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ShortSeriesHandlingConfiguration. */ +/** The parameter defining how if AutoML should handle short time series. */ public final class ShortSeriesHandlingConfiguration extends ExpandableStringEnum { /** Static value None for ShortSeriesHandlingConfiguration. */ public static final ShortSeriesHandlingConfiguration NONE = fromString("None"); 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 27327ff52c42..895ccde81c71 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 54e18a3dfd38..7322f0c9b699 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/SkuScaleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java index d5c57abc058b..dfe8df445949 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SkuScaleType. */ +/** Node scaling setting for the compute sku. */ public final class SkuScaleType extends ExpandableStringEnum { /** Static value Automatic for SkuScaleType. */ public static final SkuScaleType AUTOMATIC = fromString("Automatic"); 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 4500caef2b7e..56e8a3d998a1 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 c49319c0b114..60ccbff0c23f 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 @@ -7,7 +7,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for SkuTier. */ +/** + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not + * required on a PUT. + */ public enum SkuTier { /** Enum value Free. */ FREE("Free"), @@ -36,6 +39,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)) { @@ -45,6 +51,7 @@ public static SkuTier fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java index e5090e49e489..9c3bed85e909 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SourceType. */ +/** Data source type. */ public final class SourceType extends ExpandableStringEnum { /** Static value Dataset for SourceType. */ public static final SourceType DATASET = fromString("Dataset"); 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 000000000000..9b6270eecd4f --- /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 000000000000..7e888c8e04c9 --- /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 = "SparkJobScalaEntry", 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 000000000000..ad09175be85d --- /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 000000000000..564acd81f598 --- /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 000000000000..c050535a2ff2 --- /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("SparkJobScalaEntry") +@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 000000000000..a6195fa92514 --- /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/SshPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java index 7aa0f0256991..c646787e5318 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java @@ -8,7 +8,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SshPublicAccess. */ +/** + * Access policy for SSH + * + *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this + * instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if + * applicable. + */ public final class SshPublicAccess extends ExpandableStringEnum { /** Static value Enabled for SshPublicAccess. */ public static final SshPublicAccess ENABLED = fromString("Enabled"); 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 000000000000..fd3f5f881c95 --- /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; + +/** Enable or disable ssl for scoring. */ +public final class SslConfigStatus extends ExpandableStringEnum { + /** Static value Disabled for SslConfigStatus. */ + public static final SslConfigStatus DISABLED = fromString("Disabled"); + + /** Static value Enabled for SslConfigStatus. */ + public static final SslConfigStatus ENABLED = fromString("Enabled"); + + /** Static value Auto for SslConfigStatus. */ + public static final SslConfigStatus AUTO = fromString("Auto"); + + /** + * Creates 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 656dd43a46d3..98a81724cc50 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 ee60c5c32bbd..000000000000 --- 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 39aeadd4f94e..d4f1b4dcfdc6 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/StackMetaLearnerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java index 5b630344e176..6ca08e95460a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java @@ -8,7 +8,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StackMetaLearnerType. */ +/** + * The meta-learner is a model trained on the output of the individual heterogeneous models. Default meta-learners are + * LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet + * for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). This parameter can be one of the + * following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, + * LightGBMRegressor, or LinearRegression. + */ public final class StackMetaLearnerType extends ExpandableStringEnum { /** Static value None for StackMetaLearnerType. */ public static final StackMetaLearnerType NONE = fromString("None"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java index 2105b7a051e7..baf224ad3e33 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Status. */ +/** + * Update Workspace Quota Status. + * + *

Status of update workspace quota. + */ public final class Status extends ExpandableStringEnum { /** Static value Undefined for Status. */ public static final Status UNDEFINED = fromString("Undefined"); 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 000000000000..585bb8d63870 --- /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 000000000000..f4b3a8214d7d --- /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/StochasticOptimizer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java index ac5dd8d6cee8..dae32141ce1d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StochasticOptimizer. */ +/** Stochastic optimizer for image models. */ public final class StochasticOptimizer extends ExpandableStringEnum { /** Static value None for StochasticOptimizer. */ public static final StochasticOptimizer NONE = fromString("None"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java new file mode 100644 index 000000000000..2ef6ff8b94f1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.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.JsonProperty; + +/** Details of storage account to be used for the Registry. */ +@Fluent +public final class StorageAccountDetails { + /* + * The systemCreatedStorageAccount property. + */ + @JsonProperty(value = "systemCreatedStorageAccount") + private SystemCreatedStorageAccount systemCreatedStorageAccount; + + /* + * The userCreatedStorageAccount property. + */ + @JsonProperty(value = "userCreatedStorageAccount") + private UserCreatedStorageAccount userCreatedStorageAccount; + + /** + * Get the systemCreatedStorageAccount property: The systemCreatedStorageAccount property. + * + * @return the systemCreatedStorageAccount value. + */ + public SystemCreatedStorageAccount systemCreatedStorageAccount() { + return this.systemCreatedStorageAccount; + } + + /** + * Set the systemCreatedStorageAccount property: The systemCreatedStorageAccount property. + * + * @param systemCreatedStorageAccount the systemCreatedStorageAccount value to set. + * @return the StorageAccountDetails object itself. + */ + public StorageAccountDetails withSystemCreatedStorageAccount( + SystemCreatedStorageAccount systemCreatedStorageAccount) { + this.systemCreatedStorageAccount = systemCreatedStorageAccount; + return this; + } + + /** + * Get the userCreatedStorageAccount property: The userCreatedStorageAccount property. + * + * @return the userCreatedStorageAccount value. + */ + public UserCreatedStorageAccount userCreatedStorageAccount() { + return this.userCreatedStorageAccount; + } + + /** + * Set the userCreatedStorageAccount property: The userCreatedStorageAccount property. + * + * @param userCreatedStorageAccount the userCreatedStorageAccount value to set. + * @return the StorageAccountDetails object itself. + */ + public StorageAccountDetails withUserCreatedStorageAccount(UserCreatedStorageAccount userCreatedStorageAccount) { + this.userCreatedStorageAccount = userCreatedStorageAccount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (systemCreatedStorageAccount() != null) { + systemCreatedStorageAccount().validate(); + } + if (userCreatedStorageAccount() != null) { + userCreatedStorageAccount().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java index 5fcfb2bfbb72..33dcd6ab9bc2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StorageAccountType. */ +/** type of this storage account. */ public final class StorageAccountType extends ExpandableStringEnum { /** Static value Standard_LRS for StorageAccountType. */ public static final StorageAccountType STANDARD_LRS = fromString("Standard_LRS"); 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 6240a092e4c0..64ac3fe8462b 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/SynapseSpark.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java index 142dbc094de3..6f7a2f0a3e25 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java @@ -54,13 +54,6 @@ public SynapseSpark withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public SynapseSpark withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java new file mode 100644 index 000000000000..c5784824fca4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 SystemCreatedAcrAccount model. */ +@Fluent +public final class SystemCreatedAcrAccount { + /* + * The acrAccountSku property. + */ + @JsonProperty(value = "acrAccountSku") + private String acrAccountSku; + + /* + * ARM ResourceId of a resource + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /** + * Get the acrAccountSku property: The acrAccountSku property. + * + * @return the acrAccountSku value. + */ + public String acrAccountSku() { + return this.acrAccountSku; + } + + /** + * Set the acrAccountSku property: The acrAccountSku property. + * + * @param acrAccountSku the acrAccountSku value to set. + * @return the SystemCreatedAcrAccount object itself. + */ + public SystemCreatedAcrAccount withAcrAccountSku(String acrAccountSku) { + this.acrAccountSku = acrAccountSku; + return this; + } + + /** + * Get the armResourceId property: ARM ResourceId of a resource. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: ARM ResourceId of a resource. + * + * @param armResourceId the armResourceId value to set. + * @return the SystemCreatedAcrAccount object itself. + */ + public SystemCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java new file mode 100644 index 000000000000..0cb633c34c90 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.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.JsonProperty; + +/** The SystemCreatedStorageAccount model. */ +@Fluent +public final class SystemCreatedStorageAccount { + /* + * ARM ResourceId of a resource + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /* + * The storageAccountHnsEnabled property. + */ + @JsonProperty(value = "storageAccountHnsEnabled") + private Boolean storageAccountHnsEnabled; + + /* + * Allowed values: + * "Standard_LRS", + * "Standard_GRS", + * "Standard_RAGRS", + * "Standard_ZRS", + * "Standard_GZRS", + * "Standard_RAGZRS", + * "Premium_LRS", + * "Premium_ZRS" + */ + @JsonProperty(value = "storageAccountType") + private String storageAccountType; + + /** + * Get the armResourceId property: ARM ResourceId of a resource. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: ARM ResourceId of a resource. + * + * @param armResourceId the armResourceId value to set. + * @return the SystemCreatedStorageAccount object itself. + */ + public SystemCreatedStorageAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Get the storageAccountHnsEnabled property: The storageAccountHnsEnabled property. + * + * @return the storageAccountHnsEnabled value. + */ + public Boolean storageAccountHnsEnabled() { + return this.storageAccountHnsEnabled; + } + + /** + * Set the storageAccountHnsEnabled property: The storageAccountHnsEnabled property. + * + * @param storageAccountHnsEnabled the storageAccountHnsEnabled value to set. + * @return the SystemCreatedStorageAccount object itself. + */ + public SystemCreatedStorageAccount withStorageAccountHnsEnabled(Boolean storageAccountHnsEnabled) { + this.storageAccountHnsEnabled = storageAccountHnsEnabled; + return this; + } + + /** + * Get the storageAccountType property: Allowed values: "Standard_LRS", "Standard_GRS", "Standard_RAGRS", + * "Standard_ZRS", "Standard_GZRS", "Standard_RAGZRS", "Premium_LRS", "Premium_ZRS". + * + * @return the storageAccountType value. + */ + public String storageAccountType() { + return this.storageAccountType; + } + + /** + * Set the storageAccountType property: Allowed values: "Standard_LRS", "Standard_GRS", "Standard_RAGRS", + * "Standard_ZRS", "Standard_GZRS", "Standard_RAGZRS", "Premium_LRS", "Premium_ZRS". + * + * @param storageAccountType the storageAccountType value to set. + * @return the SystemCreatedStorageAccount object itself. + */ + public SystemCreatedStorageAccount withStorageAccountType(String storageAccountType) { + this.storageAccountType = storageAccountType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableFixedParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableFixedParameters.java new file mode 100644 index 000000000000..d2fb33727ed9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableFixedParameters.java @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Fixed training parameters that won't be swept over during AutoML Table training. */ +@Fluent +public final class TableFixedParameters { + /* + * Specify the boosting type, e.g gbdt for XGBoost. + */ + @JsonProperty(value = "booster") + private String booster; + + /* + * Specify the boosting type, e.g gbdt for LightGBM. + */ + @JsonProperty(value = "boostingType") + private String boostingType; + + /* + * Specify the grow policy, which controls the way new nodes are added to the tree. + */ + @JsonProperty(value = "growPolicy") + private String growPolicy; + + /* + * The learning rate for the training procedure. + */ + @JsonProperty(value = "learningRate") + private Double learningRate; + + /* + * Specify the Maximum number of discrete bins to bucket continuous features . + */ + @JsonProperty(value = "maxBin") + private Integer maxBin; + + /* + * Specify the max depth to limit the tree depth explicitly. + */ + @JsonProperty(value = "maxDepth") + private Integer maxDepth; + + /* + * Specify the max leaves to limit the tree leaves explicitly. + */ + @JsonProperty(value = "maxLeaves") + private Integer maxLeaves; + + /* + * The minimum number of data per leaf. + */ + @JsonProperty(value = "minDataInLeaf") + private Integer minDataInLeaf; + + /* + * Minimum loss reduction required to make a further partition on a leaf node of the tree. + */ + @JsonProperty(value = "minSplitGain") + private Double minSplitGain; + + /* + * The name of the model to train. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * Specify the number of trees (or rounds) in an model. + */ + @JsonProperty(value = "nEstimators") + private Integer nEstimators; + + /* + * Specify the number of leaves. + */ + @JsonProperty(value = "numLeaves") + private Integer numLeaves; + + /* + * The name of the preprocessor to use. + */ + @JsonProperty(value = "preprocessorName") + private String preprocessorName; + + /* + * L1 regularization term on weights. + */ + @JsonProperty(value = "regAlpha") + private Double regAlpha; + + /* + * L2 regularization term on weights. + */ + @JsonProperty(value = "regLambda") + private Double regLambda; + + /* + * Subsample ratio of the training instance. + */ + @JsonProperty(value = "subsample") + private Double subsample; + + /* + * Frequency of subsample. + */ + @JsonProperty(value = "subsampleFreq") + private Double subsampleFreq; + + /* + * Specify the tree method. + */ + @JsonProperty(value = "treeMethod") + private String treeMethod; + + /* + * If true, center before scaling the data with StandardScalar. + */ + @JsonProperty(value = "withMean") + private Boolean withMean; + + /* + * If true, scaling the data with Unit Variance with StandardScalar. + */ + @JsonProperty(value = "withStd") + private Boolean withStd; + + /** + * Get the booster property: Specify the boosting type, e.g gbdt for XGBoost. + * + * @return the booster value. + */ + public String booster() { + return this.booster; + } + + /** + * Set the booster property: Specify the boosting type, e.g gbdt for XGBoost. + * + * @param booster the booster value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withBooster(String booster) { + this.booster = booster; + return this; + } + + /** + * Get the boostingType property: Specify the boosting type, e.g gbdt for LightGBM. + * + * @return the boostingType value. + */ + public String boostingType() { + return this.boostingType; + } + + /** + * Set the boostingType property: Specify the boosting type, e.g gbdt for LightGBM. + * + * @param boostingType the boostingType value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withBoostingType(String boostingType) { + this.boostingType = boostingType; + return this; + } + + /** + * Get the growPolicy property: Specify the grow policy, which controls the way new nodes are added to the tree. + * + * @return the growPolicy value. + */ + public String growPolicy() { + return this.growPolicy; + } + + /** + * Set the growPolicy property: Specify the grow policy, which controls the way new nodes are added to the tree. + * + * @param growPolicy the growPolicy value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withGrowPolicy(String growPolicy) { + this.growPolicy = growPolicy; + return this; + } + + /** + * Get the learningRate property: The learning rate for the training procedure. + * + * @return the learningRate value. + */ + public Double learningRate() { + return this.learningRate; + } + + /** + * Set the learningRate property: The learning rate for the training procedure. + * + * @param learningRate the learningRate value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withLearningRate(Double learningRate) { + this.learningRate = learningRate; + return this; + } + + /** + * Get the maxBin property: Specify the Maximum number of discrete bins to bucket continuous features . + * + * @return the maxBin value. + */ + public Integer maxBin() { + return this.maxBin; + } + + /** + * Set the maxBin property: Specify the Maximum number of discrete bins to bucket continuous features . + * + * @param maxBin the maxBin value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMaxBin(Integer maxBin) { + this.maxBin = maxBin; + return this; + } + + /** + * Get the maxDepth property: Specify the max depth to limit the tree depth explicitly. + * + * @return the maxDepth value. + */ + public Integer maxDepth() { + return this.maxDepth; + } + + /** + * Set the maxDepth property: Specify the max depth to limit the tree depth explicitly. + * + * @param maxDepth the maxDepth value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMaxDepth(Integer maxDepth) { + this.maxDepth = maxDepth; + return this; + } + + /** + * Get the maxLeaves property: Specify the max leaves to limit the tree leaves explicitly. + * + * @return the maxLeaves value. + */ + public Integer maxLeaves() { + return this.maxLeaves; + } + + /** + * Set the maxLeaves property: Specify the max leaves to limit the tree leaves explicitly. + * + * @param maxLeaves the maxLeaves value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMaxLeaves(Integer maxLeaves) { + this.maxLeaves = maxLeaves; + return this; + } + + /** + * Get the minDataInLeaf property: The minimum number of data per leaf. + * + * @return the minDataInLeaf value. + */ + public Integer minDataInLeaf() { + return this.minDataInLeaf; + } + + /** + * Set the minDataInLeaf property: The minimum number of data per leaf. + * + * @param minDataInLeaf the minDataInLeaf value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMinDataInLeaf(Integer minDataInLeaf) { + this.minDataInLeaf = minDataInLeaf; + return this; + } + + /** + * Get the minSplitGain property: Minimum loss reduction required to make a further partition on a leaf node of the + * tree. + * + * @return the minSplitGain value. + */ + public Double minSplitGain() { + return this.minSplitGain; + } + + /** + * Set the minSplitGain property: Minimum loss reduction required to make a further partition on a leaf node of the + * tree. + * + * @param minSplitGain the minSplitGain value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMinSplitGain(Double minSplitGain) { + this.minSplitGain = minSplitGain; + return this; + } + + /** + * Get the modelName property: The name of the model to train. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model to train. + * + * @param modelName the modelName value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the nEstimators property: Specify the number of trees (or rounds) in an model. + * + * @return the nEstimators value. + */ + public Integer nEstimators() { + return this.nEstimators; + } + + /** + * Set the nEstimators property: Specify the number of trees (or rounds) in an model. + * + * @param nEstimators the nEstimators value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withNEstimators(Integer nEstimators) { + this.nEstimators = nEstimators; + return this; + } + + /** + * Get the numLeaves property: Specify the number of leaves. + * + * @return the numLeaves value. + */ + public Integer numLeaves() { + return this.numLeaves; + } + + /** + * Set the numLeaves property: Specify the number of leaves. + * + * @param numLeaves the numLeaves value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withNumLeaves(Integer numLeaves) { + this.numLeaves = numLeaves; + return this; + } + + /** + * Get the preprocessorName property: The name of the preprocessor to use. + * + * @return the preprocessorName value. + */ + public String preprocessorName() { + return this.preprocessorName; + } + + /** + * Set the preprocessorName property: The name of the preprocessor to use. + * + * @param preprocessorName the preprocessorName value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withPreprocessorName(String preprocessorName) { + this.preprocessorName = preprocessorName; + return this; + } + + /** + * Get the regAlpha property: L1 regularization term on weights. + * + * @return the regAlpha value. + */ + public Double regAlpha() { + return this.regAlpha; + } + + /** + * Set the regAlpha property: L1 regularization term on weights. + * + * @param regAlpha the regAlpha value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withRegAlpha(Double regAlpha) { + this.regAlpha = regAlpha; + return this; + } + + /** + * Get the regLambda property: L2 regularization term on weights. + * + * @return the regLambda value. + */ + public Double regLambda() { + return this.regLambda; + } + + /** + * Set the regLambda property: L2 regularization term on weights. + * + * @param regLambda the regLambda value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withRegLambda(Double regLambda) { + this.regLambda = regLambda; + return this; + } + + /** + * Get the subsample property: Subsample ratio of the training instance. + * + * @return the subsample value. + */ + public Double subsample() { + return this.subsample; + } + + /** + * Set the subsample property: Subsample ratio of the training instance. + * + * @param subsample the subsample value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withSubsample(Double subsample) { + this.subsample = subsample; + return this; + } + + /** + * Get the subsampleFreq property: Frequency of subsample. + * + * @return the subsampleFreq value. + */ + public Double subsampleFreq() { + return this.subsampleFreq; + } + + /** + * Set the subsampleFreq property: Frequency of subsample. + * + * @param subsampleFreq the subsampleFreq value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withSubsampleFreq(Double subsampleFreq) { + this.subsampleFreq = subsampleFreq; + return this; + } + + /** + * Get the treeMethod property: Specify the tree method. + * + * @return the treeMethod value. + */ + public String treeMethod() { + return this.treeMethod; + } + + /** + * Set the treeMethod property: Specify the tree method. + * + * @param treeMethod the treeMethod value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withTreeMethod(String treeMethod) { + this.treeMethod = treeMethod; + return this; + } + + /** + * Get the withMean property: If true, center before scaling the data with StandardScalar. + * + * @return the withMean value. + */ + public Boolean withMean() { + return this.withMean; + } + + /** + * Set the withMean property: If true, center before scaling the data with StandardScalar. + * + * @param withMean the withMean value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withWithMean(Boolean withMean) { + this.withMean = withMean; + return this; + } + + /** + * Get the withStd property: If true, scaling the data with Unit Variance with StandardScalar. + * + * @return the withStd value. + */ + public Boolean withStd() { + return this.withStd; + } + + /** + * Set the withStd property: If true, scaling the data with Unit Variance with StandardScalar. + * + * @param withStd the withStd value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withWithStd(Boolean withStd) { + this.withStd = withStd; + 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/TableParameterSubspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableParameterSubspace.java new file mode 100644 index 000000000000..1caaf868fa65 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableParameterSubspace.java @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 TableParameterSubspace model. */ +@Fluent +public final class TableParameterSubspace { + /* + * Specify the boosting type, e.g gbdt for XGBoost. + */ + @JsonProperty(value = "booster") + private String booster; + + /* + * Specify the boosting type, e.g gbdt for LightGBM. + */ + @JsonProperty(value = "boostingType") + private String boostingType; + + /* + * Specify the grow policy, which controls the way new nodes are added to the tree. + */ + @JsonProperty(value = "growPolicy") + private String growPolicy; + + /* + * The learning rate for the training procedure. + */ + @JsonProperty(value = "learningRate") + private String learningRate; + + /* + * Specify the Maximum number of discrete bins to bucket continuous features . + */ + @JsonProperty(value = "maxBin") + private String maxBin; + + /* + * Specify the max depth to limit the tree depth explicitly. + */ + @JsonProperty(value = "maxDepth") + private String maxDepth; + + /* + * Specify the max leaves to limit the tree leaves explicitly. + */ + @JsonProperty(value = "maxLeaves") + private String maxLeaves; + + /* + * The minimum number of data per leaf. + */ + @JsonProperty(value = "minDataInLeaf") + private String minDataInLeaf; + + /* + * Minimum loss reduction required to make a further partition on a leaf node of the tree. + */ + @JsonProperty(value = "minSplitGain") + private String minSplitGain; + + /* + * The name of the model to train. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * Specify the number of trees (or rounds) in an model. + */ + @JsonProperty(value = "nEstimators") + private String nEstimators; + + /* + * Specify the number of leaves. + */ + @JsonProperty(value = "numLeaves") + private String numLeaves; + + /* + * The name of the preprocessor to use. + */ + @JsonProperty(value = "preprocessorName") + private String preprocessorName; + + /* + * L1 regularization term on weights. + */ + @JsonProperty(value = "regAlpha") + private String regAlpha; + + /* + * L2 regularization term on weights. + */ + @JsonProperty(value = "regLambda") + private String regLambda; + + /* + * Subsample ratio of the training instance. + */ + @JsonProperty(value = "subsample") + private String subsample; + + /* + * Frequency of subsample + */ + @JsonProperty(value = "subsampleFreq") + private String subsampleFreq; + + /* + * Specify the tree method. + */ + @JsonProperty(value = "treeMethod") + private String treeMethod; + + /* + * If true, center before scaling the data with StandardScalar. + */ + @JsonProperty(value = "withMean") + private String withMean; + + /* + * If true, scaling the data with Unit Variance with StandardScalar. + */ + @JsonProperty(value = "withStd") + private String withStd; + + /** + * Get the booster property: Specify the boosting type, e.g gbdt for XGBoost. + * + * @return the booster value. + */ + public String booster() { + return this.booster; + } + + /** + * Set the booster property: Specify the boosting type, e.g gbdt for XGBoost. + * + * @param booster the booster value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withBooster(String booster) { + this.booster = booster; + return this; + } + + /** + * Get the boostingType property: Specify the boosting type, e.g gbdt for LightGBM. + * + * @return the boostingType value. + */ + public String boostingType() { + return this.boostingType; + } + + /** + * Set the boostingType property: Specify the boosting type, e.g gbdt for LightGBM. + * + * @param boostingType the boostingType value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withBoostingType(String boostingType) { + this.boostingType = boostingType; + return this; + } + + /** + * Get the growPolicy property: Specify the grow policy, which controls the way new nodes are added to the tree. + * + * @return the growPolicy value. + */ + public String growPolicy() { + return this.growPolicy; + } + + /** + * Set the growPolicy property: Specify the grow policy, which controls the way new nodes are added to the tree. + * + * @param growPolicy the growPolicy value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withGrowPolicy(String growPolicy) { + this.growPolicy = growPolicy; + return this; + } + + /** + * Get the learningRate property: The learning rate for the training procedure. + * + * @return the learningRate value. + */ + public String learningRate() { + return this.learningRate; + } + + /** + * Set the learningRate property: The learning rate for the training procedure. + * + * @param learningRate the learningRate value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withLearningRate(String learningRate) { + this.learningRate = learningRate; + return this; + } + + /** + * Get the maxBin property: Specify the Maximum number of discrete bins to bucket continuous features . + * + * @return the maxBin value. + */ + public String maxBin() { + return this.maxBin; + } + + /** + * Set the maxBin property: Specify the Maximum number of discrete bins to bucket continuous features . + * + * @param maxBin the maxBin value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMaxBin(String maxBin) { + this.maxBin = maxBin; + return this; + } + + /** + * Get the maxDepth property: Specify the max depth to limit the tree depth explicitly. + * + * @return the maxDepth value. + */ + public String maxDepth() { + return this.maxDepth; + } + + /** + * Set the maxDepth property: Specify the max depth to limit the tree depth explicitly. + * + * @param maxDepth the maxDepth value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMaxDepth(String maxDepth) { + this.maxDepth = maxDepth; + return this; + } + + /** + * Get the maxLeaves property: Specify the max leaves to limit the tree leaves explicitly. + * + * @return the maxLeaves value. + */ + public String maxLeaves() { + return this.maxLeaves; + } + + /** + * Set the maxLeaves property: Specify the max leaves to limit the tree leaves explicitly. + * + * @param maxLeaves the maxLeaves value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMaxLeaves(String maxLeaves) { + this.maxLeaves = maxLeaves; + return this; + } + + /** + * Get the minDataInLeaf property: The minimum number of data per leaf. + * + * @return the minDataInLeaf value. + */ + public String minDataInLeaf() { + return this.minDataInLeaf; + } + + /** + * Set the minDataInLeaf property: The minimum number of data per leaf. + * + * @param minDataInLeaf the minDataInLeaf value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMinDataInLeaf(String minDataInLeaf) { + this.minDataInLeaf = minDataInLeaf; + return this; + } + + /** + * Get the minSplitGain property: Minimum loss reduction required to make a further partition on a leaf node of the + * tree. + * + * @return the minSplitGain value. + */ + public String minSplitGain() { + return this.minSplitGain; + } + + /** + * Set the minSplitGain property: Minimum loss reduction required to make a further partition on a leaf node of the + * tree. + * + * @param minSplitGain the minSplitGain value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMinSplitGain(String minSplitGain) { + this.minSplitGain = minSplitGain; + return this; + } + + /** + * Get the modelName property: The name of the model to train. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model to train. + * + * @param modelName the modelName value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the nEstimators property: Specify the number of trees (or rounds) in an model. + * + * @return the nEstimators value. + */ + public String nEstimators() { + return this.nEstimators; + } + + /** + * Set the nEstimators property: Specify the number of trees (or rounds) in an model. + * + * @param nEstimators the nEstimators value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withNEstimators(String nEstimators) { + this.nEstimators = nEstimators; + return this; + } + + /** + * Get the numLeaves property: Specify the number of leaves. + * + * @return the numLeaves value. + */ + public String numLeaves() { + return this.numLeaves; + } + + /** + * Set the numLeaves property: Specify the number of leaves. + * + * @param numLeaves the numLeaves value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withNumLeaves(String numLeaves) { + this.numLeaves = numLeaves; + return this; + } + + /** + * Get the preprocessorName property: The name of the preprocessor to use. + * + * @return the preprocessorName value. + */ + public String preprocessorName() { + return this.preprocessorName; + } + + /** + * Set the preprocessorName property: The name of the preprocessor to use. + * + * @param preprocessorName the preprocessorName value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withPreprocessorName(String preprocessorName) { + this.preprocessorName = preprocessorName; + return this; + } + + /** + * Get the regAlpha property: L1 regularization term on weights. + * + * @return the regAlpha value. + */ + public String regAlpha() { + return this.regAlpha; + } + + /** + * Set the regAlpha property: L1 regularization term on weights. + * + * @param regAlpha the regAlpha value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withRegAlpha(String regAlpha) { + this.regAlpha = regAlpha; + return this; + } + + /** + * Get the regLambda property: L2 regularization term on weights. + * + * @return the regLambda value. + */ + public String regLambda() { + return this.regLambda; + } + + /** + * Set the regLambda property: L2 regularization term on weights. + * + * @param regLambda the regLambda value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withRegLambda(String regLambda) { + this.regLambda = regLambda; + return this; + } + + /** + * Get the subsample property: Subsample ratio of the training instance. + * + * @return the subsample value. + */ + public String subsample() { + return this.subsample; + } + + /** + * Set the subsample property: Subsample ratio of the training instance. + * + * @param subsample the subsample value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withSubsample(String subsample) { + this.subsample = subsample; + return this; + } + + /** + * Get the subsampleFreq property: Frequency of subsample. + * + * @return the subsampleFreq value. + */ + public String subsampleFreq() { + return this.subsampleFreq; + } + + /** + * Set the subsampleFreq property: Frequency of subsample. + * + * @param subsampleFreq the subsampleFreq value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withSubsampleFreq(String subsampleFreq) { + this.subsampleFreq = subsampleFreq; + return this; + } + + /** + * Get the treeMethod property: Specify the tree method. + * + * @return the treeMethod value. + */ + public String treeMethod() { + return this.treeMethod; + } + + /** + * Set the treeMethod property: Specify the tree method. + * + * @param treeMethod the treeMethod value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withTreeMethod(String treeMethod) { + this.treeMethod = treeMethod; + return this; + } + + /** + * Get the withMean property: If true, center before scaling the data with StandardScalar. + * + * @return the withMean value. + */ + public String withMean() { + return this.withMean; + } + + /** + * Set the withMean property: If true, center before scaling the data with StandardScalar. + * + * @param withMean the withMean value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withWithMean(String withMean) { + this.withMean = withMean; + return this; + } + + /** + * Get the withStd property: If true, scaling the data with Unit Variance with StandardScalar. + * + * @return the withStd value. + */ + public String withStd() { + return this.withStd; + } + + /** + * Set the withStd property: If true, scaling the data with Unit Variance with StandardScalar. + * + * @param withStd the withStd value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withWithStd(String withStd) { + this.withStd = withStd; + 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/TableSweepSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableSweepSettings.java new file mode 100644 index 000000000000..00f6b62ea131 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableSweepSettings.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableSweepSettings model. */ +@Fluent +public final class TableSweepSettings { + /* + * Type of early termination policy for the sweeping job. + */ + @JsonProperty(value = "earlyTermination") + private EarlyTerminationPolicy earlyTermination; + + /* + * [Required] Type of sampling algorithm. + */ + @JsonProperty(value = "samplingAlgorithm", required = true) + private SamplingAlgorithmType samplingAlgorithm; + + /** + * Get the earlyTermination property: Type of early termination policy for the sweeping job. + * + * @return the earlyTermination value. + */ + public EarlyTerminationPolicy earlyTermination() { + return this.earlyTermination; + } + + /** + * Set the earlyTermination property: Type of early termination policy for the sweeping job. + * + * @param earlyTermination the earlyTermination value to set. + * @return the TableSweepSettings object itself. + */ + public TableSweepSettings withEarlyTermination(EarlyTerminationPolicy earlyTermination) { + this.earlyTermination = earlyTermination; + return this; + } + + /** + * Get the samplingAlgorithm property: [Required] Type of sampling algorithm. + * + * @return the samplingAlgorithm value. + */ + public SamplingAlgorithmType samplingAlgorithm() { + return this.samplingAlgorithm; + } + + /** + * Set the samplingAlgorithm property: [Required] Type of sampling algorithm. + * + * @param samplingAlgorithm the samplingAlgorithm value to set. + * @return the TableSweepSettings object itself. + */ + public TableSweepSettings withSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithm) { + this.samplingAlgorithm = samplingAlgorithm; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (earlyTermination() != null) { + earlyTermination().validate(); + } + if (samplingAlgorithm() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property samplingAlgorithm in model TableSweepSettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TableSweepSettings.class); +} 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 56816059ee7b..e43c3b06cb3b 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. @@ -22,6 +23,12 @@ public class TableVertical { @JsonProperty(value = "featurizationSettings") private TableVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private TableFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @@ -29,28 +36,76 @@ 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 = "nCrossValidations") + private NCrossValidations nCrossValidations; + + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private TableSweepSettings sweepSettings; + + /* + * 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 = "trainingSettings") - private TrainingSettings trainingSettings; + @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; } @@ -74,6 +129,26 @@ public TableVertical withFeaturizationSettings(TableVerticalFeaturizationSetting return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public TableFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the TableVertical object itself. + */ + public TableVertical withFixedParameters(TableFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. * @@ -95,22 +170,172 @@ 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 searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the TableVertical object itself. + */ + public TableVertical withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public TableSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the TableVertical object itself. + */ + public TableVertical withSweepSettings(TableSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + 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 +345,29 @@ 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 (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } - if (trainingSettings() != null) { - trainingSettings().validate(); + if (nCrossValidations() != null) { + nCrossValidations().validate(); + } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().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 ac98e0ce4ded..000000000000 --- 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 03ae45a3adca..5b6f212e4627 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 3b6fa66980ae..849713643edd 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; @@ -42,6 +42,18 @@ public final class TableVerticalLimitSettings { @JsonProperty(value = "maxTrials") private Integer maxTrials; + /* + * Number of concurrent sweeping runs that user wants to trigger. + */ + @JsonProperty(value = "sweepConcurrentTrials") + private Integer sweepConcurrentTrials; + + /* + * Number of sweeping runs that user wants to trigger. + */ + @JsonProperty(value = "sweepTrials") + private Integer sweepTrials; + /* * AutoML job timeout. */ @@ -156,6 +168,46 @@ public TableVerticalLimitSettings withMaxTrials(Integer maxTrials) { return this; } + /** + * Get the sweepConcurrentTrials property: Number of concurrent sweeping runs that user wants to trigger. + * + * @return the sweepConcurrentTrials value. + */ + public Integer sweepConcurrentTrials() { + return this.sweepConcurrentTrials; + } + + /** + * Set the sweepConcurrentTrials property: Number of concurrent sweeping runs that user wants to trigger. + * + * @param sweepConcurrentTrials the sweepConcurrentTrials value to set. + * @return the TableVerticalLimitSettings object itself. + */ + public TableVerticalLimitSettings withSweepConcurrentTrials(Integer sweepConcurrentTrials) { + this.sweepConcurrentTrials = sweepConcurrentTrials; + return this; + } + + /** + * Get the sweepTrials property: Number of sweeping runs that user wants to trigger. + * + * @return the sweepTrials value. + */ + public Integer sweepTrials() { + return this.sweepTrials; + } + + /** + * Set the sweepTrials property: Number of sweeping runs that user wants to trigger. + * + * @param sweepTrials the sweepTrials value to set. + * @return the TableVerticalLimitSettings object itself. + */ + public TableVerticalLimitSettings withSweepTrials(Integer sweepTrials) { + this.sweepTrials = sweepTrials; + return this; + } + /** * Get the timeout property: AutoML job timeout. * 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 510c3ec34077..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalValidationDataSettings.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Validation settings for AutoML Table vertical tasks - Classification/Regression/Forecasting. */ -@Fluent -public final class TableVerticalValidationDataSettings extends ValidationDataSettings { - /* - * Columns to use for CVSplit data. - */ - @JsonProperty(value = "cvSplitColumnNames") - private List cvSplitColumnNames; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - @JsonProperty(value = "nCrossValidations") - private NCrossValidations nCrossValidations; - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the TableVerticalValidationDataSettings object itself. - */ - public TableVerticalValidationDataSettings withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the TableVerticalValidationDataSettings object itself. - */ - public TableVerticalValidationDataSettings withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalValidationDataSettings withData(MLTableJobInput data) { - super.withData(data); - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalValidationDataSettings withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java index 2479f0d555f0..29d30f360d8c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TargetAggregationFunction. */ +/** Target aggregate function. */ public final class TargetAggregationFunction extends ExpandableStringEnum { /** Static value None for TargetAggregationFunction. */ public static final TargetAggregationFunction NONE = fromString("None"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java index 75e0e3896045..c3c1603a14d3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TargetLagsMode. */ +/** Target lags selection modes. */ public final class TargetLagsMode extends ExpandableStringEnum { /** Static value Auto for TargetLagsMode. */ public static final TargetLagsMode AUTO = fromString("Auto"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java index 602aaeea6f70..ecd25c3acb70 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TargetRollingWindowSizeMode. */ +/** Target rolling windows size mode. */ public final class TargetRollingWindowSizeMode extends ExpandableStringEnum { /** Static value Auto for TargetRollingWindowSizeMode. */ public static final TargetRollingWindowSizeMode AUTO = fromString("Auto"); 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 883674640ed2..0e094241c9e7 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/TaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java index 4913494e15a8..041f3ce41acc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TaskType. */ +/** AutoMLJob Task type. */ public final class TaskType extends ExpandableStringEnum { /** Static value Classification for TaskType. */ public static final TaskType CLASSIFICATION = fromString("Classification"); 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 53e832a6dfcd..000000000000 --- 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 000000000000..f9ae2c5a2513 --- /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; + +/** Annotation type of text data. */ +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 fcc2d0bc8462..3bcf0e71d278 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 @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; /** Text Classification task in AutoML NLP vertical. NLP - Natural Language Processing. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @@ -20,24 +21,42 @@ 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. */ @JsonProperty(value = "featurizationSettings") private NlpVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private NlpFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private NlpSweepSettings sweepSettings; + + /* + * Validation data inputs. + */ + @JsonProperty(value = "validationData") + private MLTableJobInput validationData; + /** * Get the primaryMetric property: Primary metric for Text-Classification task. * @@ -59,42 +78,42 @@ public TextClassification withPrimaryMetric(ClassificationPrimaryMetrics primary } /** - * Get the dataSettings property: Data inputs for AutoMLJob. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the dataSettings value. + * @return the featurizationSettings value. */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the dataSettings property: Data inputs for AutoMLJob. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param dataSettings the dataSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the TextClassification object itself. */ - public TextClassification withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; + public TextClassification withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. * - * @return the featurizationSettings value. + * @return the fixedParameters value. */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public NlpFixedParameters fixedParameters() { + return this.fixedParameters; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. * - * @param featurizationSettings the featurizationSettings value to set. + * @param fixedParameters the fixedParameters value to set. * @return the TextClassification object itself. */ - public TextClassification withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public TextClassification withFixedParameters(NlpFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; return this; } @@ -118,6 +137,68 @@ public TextClassification withLimitSettings(NlpVerticalLimitSettings limitSettin return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the TextClassification object itself. + */ + public TextClassification withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public NlpSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the TextClassification object itself. + */ + public TextClassification withSweepSettings(NlpSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + + /** + * Get the validationData property: Validation data inputs. + * + * @return the validationData value. + */ + public MLTableJobInput validationData() { + return this.validationData; + } + + /** + * Set the validationData property: Validation data inputs. + * + * @param validationData the validationData value to set. + * @return the TextClassification object itself. + */ + public TextClassification withValidationData(MLTableJobInput validationData) { + this.validationData = validationData; + return this; + } + /** {@inheritDoc} */ @Override public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { @@ -125,6 +206,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 +228,23 @@ public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { @Override public void validate() { super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); - } if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().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 0b35a8b86b92..2cd3be214686 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 @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; /** Text Classification Multilabel task in AutoML NLP vertical. NLP - Natural Language Processing. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @@ -16,30 +17,47 @@ 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. */ @JsonProperty(value = "featurizationSettings") private NlpVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private NlpFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private NlpSweepSettings sweepSettings; + + /* + * 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. @@ -51,43 +69,43 @@ public ClassificationMultilabelPrimaryMetrics primaryMetric() { } /** - * Get the dataSettings property: Data inputs for AutoMLJob. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the dataSettings value. + * @return the featurizationSettings value. */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the dataSettings property: Data inputs for AutoMLJob. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param dataSettings the dataSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the TextClassificationMultilabel object itself. */ - public TextClassificationMultilabel withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; + public TextClassificationMultilabel withFeaturizationSettings( + NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. * - * @return the featurizationSettings value. + * @return the fixedParameters value. */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public NlpFixedParameters fixedParameters() { + return this.fixedParameters; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. * - * @param featurizationSettings the featurizationSettings value to set. + * @param fixedParameters the fixedParameters value to set. * @return the TextClassificationMultilabel object itself. */ - public TextClassificationMultilabel withFeaturizationSettings( - NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public TextClassificationMultilabel withFixedParameters(NlpFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; return this; } @@ -111,6 +129,68 @@ public TextClassificationMultilabel withLimitSettings(NlpVerticalLimitSettings l return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the TextClassificationMultilabel object itself. + */ + public TextClassificationMultilabel withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public NlpSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the TextClassificationMultilabel object itself. + */ + public TextClassificationMultilabel withSweepSettings(NlpSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + + /** + * Get the validationData property: Validation data inputs. + * + * @return the validationData value. + */ + public MLTableJobInput validationData() { + return this.validationData; + } + + /** + * Set the validationData property: Validation data inputs. + * + * @param validationData the validationData value to set. + * @return the TextClassificationMultilabel object itself. + */ + public TextClassificationMultilabel withValidationData(MLTableJobInput validationData) { + this.validationData = validationData; + return this; + } + /** {@inheritDoc} */ @Override public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { @@ -118,6 +198,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 +220,23 @@ public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) @Override public void validate() { super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); - } if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().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 aa93b9e1c0ba..5740506796e6 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 @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; /** Text-NER task in AutoML NLP vertical. NER - Named Entity Recognition. NLP - Natural Language Processing. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @@ -16,30 +17,47 @@ 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. */ @JsonProperty(value = "featurizationSettings") private NlpVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private NlpFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private NlpSweepSettings sweepSettings; + + /* + * 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. @@ -51,42 +69,42 @@ public ClassificationPrimaryMetrics primaryMetric() { } /** - * Get the dataSettings property: Data inputs for AutoMLJob. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the dataSettings value. + * @return the featurizationSettings value. */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the dataSettings property: Data inputs for AutoMLJob. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param dataSettings the dataSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the TextNer object itself. */ - public TextNer withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; + public TextNer withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. * - * @return the featurizationSettings value. + * @return the fixedParameters value. */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public NlpFixedParameters fixedParameters() { + return this.fixedParameters; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. * - * @param featurizationSettings the featurizationSettings value to set. + * @param fixedParameters the fixedParameters value to set. * @return the TextNer object itself. */ - public TextNer withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public TextNer withFixedParameters(NlpFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; return this; } @@ -110,6 +128,68 @@ public TextNer withLimitSettings(NlpVerticalLimitSettings limitSettings) { return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the TextNer object itself. + */ + public TextNer withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public NlpSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the TextNer object itself. + */ + public TextNer withSweepSettings(NlpSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + + /** + * Get the validationData property: Validation data inputs. + * + * @return the validationData value. + */ + public MLTableJobInput validationData() { + return this.validationData; + } + + /** + * Set the validationData property: Validation data inputs. + * + * @param validationData the validationData value to set. + * @return the TextNer object itself. + */ + public TextNer withValidationData(MLTableJobInput validationData) { + this.validationData = validationData; + return this; + } + /** {@inheritDoc} */ @Override public TextNer withLogVerbosity(LogVerbosity logVerbosity) { @@ -117,6 +197,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 +219,23 @@ public TextNer withLogVerbosity(LogVerbosity logVerbosity) { @Override public void validate() { super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); - } if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().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 000000000000..e500ba455c30 --- /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 a6c1a31f294b..000000000000 --- 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 6c2ef2bde7b6..89e5a4783219 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 5a343d33d2df..106148286907 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 000000000000..5b2c108b19d4 --- /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 000000000000..9e43266223ea --- /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 dde01e0b5fa9..ea24f13be7d9 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 87b7ab40bfdd..d62f2ccdf2b1 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/UnitOfMeasure.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java index 032d238fb46f..cfcf56abf7ab 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UnitOfMeasure. */ +/** + * Unit of time measure + * + *

The unit of time measurement for the specified VM price. Example: OneHour. + */ public final class UnitOfMeasure extends ExpandableStringEnum { /** Static value OneHour for UnitOfMeasure. */ public static final UnitOfMeasure ONE_HOUR = fromString("OneHour"); 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 7f9aaa6d4f25..56325817b8d9 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 e604e249f90e..19e2ce991b8e 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 88e20a573df0..e16ce0c8718c 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 559611b1fb63..eb67b36606b7 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 2d20dd82ada1..49a701f4d565 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 7220e2d1e41e..a79c1aba5581 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 dbe331b23982..35868b601201 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/UsageUnit.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java index a7eeee04e822..caa3d2ac1179 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UsageUnit. */ +/** An enum describing the unit of usage measurement. */ public final class UsageUnit extends ExpandableStringEnum { /** Static value Count for UsageUnit. */ public static final UsageUnit COUNT = fromString("Count"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java index 4e9d2d01c37f..fdfac831dca6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UseStl. */ +/** Configure STL Decomposition of the time-series target column. */ public final class UseStl extends ExpandableStringEnum { /** Static value None for UseStl. */ public static final UseStl NONE = fromString("None"); 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 9d855264fb74..e15c3d7aa613 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/UserCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java new file mode 100644 index 000000000000..df7bc440b9c1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.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.JsonProperty; + +/** The UserCreatedAcrAccount model. */ +@Fluent +public final class UserCreatedAcrAccount { + /* + * ARM ResourceId of a resource + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /** + * Get the armResourceId property: ARM ResourceId of a resource. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: ARM ResourceId of a resource. + * + * @param armResourceId the armResourceId value to set. + * @return the UserCreatedAcrAccount object itself. + */ + public UserCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java new file mode 100644 index 000000000000..ef822b754e91 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.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.JsonProperty; + +/** The UserCreatedStorageAccount model. */ +@Fluent +public final class UserCreatedStorageAccount { + /* + * ARM ResourceId of a resource + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /** + * Get the armResourceId property: ARM ResourceId of a resource. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: ARM ResourceId of a resource. + * + * @param armResourceId the armResourceId value to set. + * @return the UserCreatedStorageAccount object itself. + */ + public UserCreatedStorageAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} 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 000000000000..81f1a0f66a8d --- /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(String category) { + super.withCategory(category); + return this; + } + + /** {@inheritDoc} */ + @Override + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** {@inheritDoc} */ + @Override + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValue(String value) { + super.withValue(value); + return this; + } + + /** {@inheritDoc} */ + @Override + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { + super.withValueFormat(valueFormat); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java index 6390876ef33e..2cc6a91bd74d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VMPriceOSType. */ +/** + * OS type + * + *

Operating system type used by the VM. + */ public final class VMPriceOSType extends ExpandableStringEnum { /** Static value Linux for VMPriceOSType. */ public static final VMPriceOSType LINUX = fromString("Linux"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java index f074a5d388ce..624a44b32381 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VMTier. */ +/** + * VM tier + * + *

The type of the VM. + */ public final class VMTier extends ExpandableStringEnum { /** Static value Standard for VMTier. */ public static final VMTier STANDARD = fromString("Standard"); 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 9e1610f594e3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationDataSettings.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Validation settings. */ -@Fluent -public class ValidationDataSettings { - /* - * Validation data MLTable. - */ - @JsonProperty(value = "data") - private MLTableJobInput data; - - /* - * The fraction of training dataset that needs to be set aside for - * validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /** - * Get the data property: Validation data MLTable. - * - * @return the data value. - */ - public MLTableJobInput data() { - return this.data; - } - - /** - * Set the data property: Validation data MLTable. - * - * @param data the data value to set. - * @return the ValidationDataSettings object itself. - */ - public ValidationDataSettings withData(MLTableJobInput data) { - this.data = data; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ValidationDataSettings object itself. - */ - public ValidationDataSettings withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (data() != null) { - data().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java index 1a88e58c6177..18d30da23337 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ValidationMetricType. */ +/** Metric computation method to use for validation metrics in image tasks. */ public final class ValidationMetricType extends ExpandableStringEnum { /** Static value None for ValidationMetricType. */ public static final ValidationMetricType NONE = fromString("None"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java index d41c8042696c..e2f414ac4e9c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ValueFormat. */ +/** format for the workspace connection value. */ public final class ValueFormat extends ExpandableStringEnum { /** Static value JSON for ValueFormat. */ public static final ValueFormat JSON = fromString("JSON"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java index e2432e19f599..ded5cdcd9030 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java @@ -54,13 +54,6 @@ public VirtualMachine withResourceId(String resourceId) { return this; } - /** {@inheritDoc} */ - @Override - public VirtualMachine withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - /** * Validates the instance. * 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 bc3080416502..876c59ea32de 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/VmPriority.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java index 4dad28dab83c..6cd5ff35ee47 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VmPriority. */ +/** Virtual Machine priority. */ public final class VmPriority extends ExpandableStringEnum { /** Static value Dedicated for VmPriority. */ public static final VmPriority DEDICATED = fromString("Dedicated"); 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 000000000000..a88532ef174f --- /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 000000000000..c69699b1eaf1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of Volume Definition + * + *

Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + */ +public final class VolumeDefinitionType extends ExpandableStringEnum { + /** Static value bind for VolumeDefinitionType. */ + public static final VolumeDefinitionType BIND = fromString("bind"); + + /** Static value volume for VolumeDefinitionType. */ + public static final VolumeDefinitionType VOLUME = fromString("volume"); + + /** Static value tmpfs for VolumeDefinitionType. */ + public static final VolumeDefinitionType TMPFS = fromString("tmpfs"); + + /** Static value npipe for VolumeDefinitionType. */ + public static final VolumeDefinitionType NPIPE = fromString("npipe"); + + /** + * Creates 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 000000000000..69626042b9bf --- /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 000000000000..254563d7c5fa --- /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; + +/** Enum of weekday. */ +public final class WeekDay extends ExpandableStringEnum { + /** Static value Monday for WeekDay. */ + public static final WeekDay MONDAY = fromString("Monday"); + + /** Static value Tuesday for WeekDay. */ + public static final WeekDay TUESDAY = fromString("Tuesday"); + + /** Static value Wednesday for WeekDay. */ + public static final WeekDay WEDNESDAY = fromString("Wednesday"); + + /** Static value Thursday for WeekDay. */ + public static final WeekDay THURSDAY = fromString("Thursday"); + + /** Static value Friday for WeekDay. */ + public static final WeekDay FRIDAY = fromString("Friday"); + + /** Static value Saturday for WeekDay. */ + public static final WeekDay SATURDAY = fromString("Saturday"); + + /** Static value Sunday for WeekDay. */ + public static final WeekDay SUNDAY = fromString("Sunday"); + + /** + * Creates 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 fe113a65753a..000000000000 --- 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 d3c6896d3395..f06dc1006eb3 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 448fa89e35a6..000000000000 --- 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/WorkspaceConnectionAccessKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java new file mode 100644 index 000000000000..59ff4dce4e82 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.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 WorkspaceConnectionAccessKey model. */ +@Fluent +public final class WorkspaceConnectionAccessKey { + /* + * The accessKeyId property. + */ + @JsonProperty(value = "accessKeyId") + private String accessKeyId; + + /* + * The secretAccessKey property. + */ + @JsonProperty(value = "secretAccessKey") + private String secretAccessKey; + + /** + * Get the accessKeyId property: The accessKeyId property. + * + * @return the accessKeyId value. + */ + public String accessKeyId() { + return this.accessKeyId; + } + + /** + * Set the accessKeyId property: The accessKeyId property. + * + * @param accessKeyId the accessKeyId value to set. + * @return the WorkspaceConnectionAccessKey object itself. + */ + public WorkspaceConnectionAccessKey withAccessKeyId(String accessKeyId) { + this.accessKeyId = accessKeyId; + return this; + } + + /** + * Get the secretAccessKey property: The secretAccessKey property. + * + * @return the secretAccessKey value. + */ + public String secretAccessKey() { + return this.secretAccessKey; + } + + /** + * Set the secretAccessKey property: The secretAccessKey property. + * + * @param secretAccessKey the secretAccessKey value to set. + * @return the WorkspaceConnectionAccessKey object itself. + */ + public WorkspaceConnectionAccessKey withSecretAccessKey(String secretAccessKey) { + this.secretAccessKey = secretAccessKey; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 000000000000..e0aae15b2cef --- /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 000000000000..31481d31ce02 --- /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 50% 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 15f018b7d07c..4139eeecc53f 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,44 @@ // 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 = "AccessKey", value = AccessKeyAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalAuthTypeWorkspaceConnectionProperties.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; /* - * 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,7 +53,7 @@ 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. */ @@ -51,18 +62,18 @@ public String 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(String 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 +82,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 +105,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 +125,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 000000000000..22ef3cb48926 --- /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 000000000000..fa1097597d03 --- /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/WorkspaceConnectionServicePrincipal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java new file mode 100644 index 000000000000..b0ba249d8aae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.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 WorkspaceConnectionServicePrincipal model. */ +@Fluent +public final class WorkspaceConnectionServicePrincipal { + /* + * The clientId property. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The clientSecret property. + */ + @JsonProperty(value = "clientSecret") + private String clientSecret; + + /* + * The tenantId property. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * Get the clientId property: The clientId property. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The clientId property. + * + * @param clientId the clientId value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecret property: The clientSecret property. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret property: The clientSecret property. + * + * @param clientSecret the clientSecret value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 000000000000..adcacedaf727 --- /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 000000000000..083f0fad7346 --- /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 d94b5a973c35..9e7027680eb1 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 cfc2cce4028c..ad3e85aa46ef 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 19ad751b1639..d930bcac47b5 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 000000000000..16cb87ce6aee --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProvisioningState.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The current deployment state of workspace resource. The provisioningState is to indicate states for resource + * provisioning. + */ +public final class 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 8687983388fc..253b22f022bf 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/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java index 2577043eada6..d0923a3048a1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for AzureMachineLearningWorkspaces. These APIs allow end users to operate on Azure + * Package containing the data models for AzureMachineLearningServices. These APIs allow end users to operate on Azure * Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java index a318a1e7d76b..93e6c12b06e6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for AzureMachineLearningWorkspaces. These APIs allow end users to operate on Azure + * Package containing the classes for AzureMachineLearningServices. These APIs allow end users to operate on Azure * Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/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 eac86beb3de6..a187a17f002e 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,14 +26,14 @@ /** 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-10-01-preview/examples/Workspace/BatchDeployment/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Batch Deployment. + * Sample code: CreateOrUpdate Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateBatchDeployment( + public static void createOrUpdateWorkspaceBatchDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager .batchDeployments() @@ -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 67c049a0f734..4514dccd22ca 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/BatchDeployment/delete.json */ /** - * Sample code: Delete Batch Deployment. + * Sample code: Delete Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .delete("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java index 52763f10899a..dffde0f28cac 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/BatchDeployment/get.json */ /** - * Sample code: Get Batch Deployment. + * Sample code: Get Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void getBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java index ebce2bdb3947..40cfb1527912 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/BatchDeployment/list.json */ /** - * Sample code: List Batch Deployment. + * Sample code: List Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void listBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .list("test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java index a20abef1e252..aa636819c4df 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,25 @@ 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-10-01-preview/examples/Workspace/BatchDeployment/update.json */ /** - * Sample code: Update Batch Deployment. + * Sample code: Update Workspace 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 updateWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + BatchDeployment resource = manager .batchDeployments() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) @@ -43,41 +30,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 349da87e6658..dbe91614c4f5 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,14 +18,14 @@ /** 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-10-01-preview/examples/Workspace/BatchEndpoint/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Batch Endpoint. + * Sample code: CreateOrUpdate Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateBatchEndpoint( + public static void createOrUpdateWorkspaceBatchEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() @@ -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 a8f44bb8de56..ec91af549792 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/BatchEndpoint/delete.json */ /** - * Sample code: Delete Batch Endpoint. + * Sample code: Delete Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java index 19442d7d653e..62ef059ce884 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/BatchEndpoint/get.json */ /** - * Sample code: Get Batch Endpoint. + * Sample code: Get Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java index 88843178691a..f6d0c7b9e83c 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/BatchEndpoint/listKeys.json */ /** - * Sample code: ListKeys Batch Endpoint. + * Sample code: ListKeys Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listKeysWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java index 98907210c636..37ef143e59fd 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/BatchEndpoint/list.json */ /** - * Sample code: List Batch Endpoint. + * Sample code: List Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().list("test-rg", "my-aml-workspace", 1, null, Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java index beaf25304088..3d73f82adf8c 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,16 +17,16 @@ /** 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-10-01-preview/examples/Workspace/BatchEndpoint/update.json */ /** - * Sample code: Update Batch Endpoint. + * Sample code: Update Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - BatchEndpointData resource = + public static void updateWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + 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 f31367a57160..6f158e606dfc 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,31 +4,36 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.CodeContainerDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; +import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/CodeContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Code Container. + * Sample code: CreateOrUpdate Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCodeContainer( + public static void createOrUpdateWorkspaceCodeContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new CodeContainerDetails() - .withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "testworkspace", + "testContainer", + new CodeContainerInner() + .withProperties( + new CodeContainerProperties() + .withDescription("string") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))), + Context.NONE); } @SuppressWarnings("unchecked") 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 71c42219e345..c7d5222cda2d 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/CodeContainer/delete.json */ /** - * Sample code: Delete Code Container. + * Sample code: Delete Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeContainers().deleteWithResponse("testrg123", "testworkspace", "testContainer", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java index 4d56a219f3b0..ebcb413c2e66 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/CodeContainer/get.json */ /** - * Sample code: Get Code Container. + * Sample code: Get Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeContainers().getWithResponse("testrg123", "testworkspace", "testContainer", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java index 69615834acac..a3f47fc6cf1e 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/CodeContainer/list.json */ /** - * Sample code: List Code Container. + * Sample code: List Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeContainers().list("testrg123", "testworkspace", null, Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java index 1ad229f94eb9..b2fa01caa70b 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,34 +4,40 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.CodeVersionDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/CodeVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Code Version. + * Sample code: CreateOrUpdate Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCodeVersion( + public static void createOrUpdateWorkspaceCodeVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() - .define("string") - .withExistingCode("test-rg", "my-aml-workspace", "string") - .withProperties( - new CodeVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withCodeUri("https://blobStorage/folderName")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new CodeVersionInner() + .withProperties( + new CodeVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withCodeUri("https://blobStorage/folderName")), + Context.NONE); } @SuppressWarnings("unchecked") 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 2b63aece4d95..e771872f8868 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/CodeVersion/delete.json */ /** - * Sample code: Delete Code Version. + * Sample code: Delete Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java index 67de6bacaf37..fe9a539e4f1c 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/CodeVersion/get.json */ /** - * Sample code: Get Code Version. + * Sample code: Get Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java index 79352a832f3e..3e11d133a8a4 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/CodeVersion/list.json */ /** - * Sample code: List Code Version. + * Sample code: List Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions().list("test-rg", "my-aml-workspace", "string", "string", 1, null, Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java index 98a987107b8e..c68b1e78b094 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,32 +4,37 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/ComponentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Component Container. + * Sample code: CreateOrUpdate Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateComponentContainer( + public static void createOrUpdateWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ComponentContainerDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string"))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + new ComponentContainerInner() + .withProperties( + new ComponentContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))), + Context.NONE); } @SuppressWarnings("unchecked") 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 1c013acc405a..eef3b3183ed7 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/ComponentContainer/delete.json */ /** - * Sample code: Delete Component Container. + * Sample code: Delete Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteComponentContainer( + public static void deleteWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentContainers().deleteWithResponse("test-rg", "my-aml-workspace", "string", Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java index 263dcdff41a9..d060c52e664b 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ComponentContainer/get.json */ /** - * Sample code: Get Component Container. + * Sample code: Get Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentContainers().getWithResponse("test-rg", "my-aml-workspace", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java index 7178143bf2dd..110b97f5e696 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/ComponentContainer/list.json */ /** - * Sample code: List Component Container. + * Sample code: List Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentContainer( + public static void listWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentContainers().list("test-rg", "my-aml-workspace", null, null, Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java index 9a68d798b013..b86d3aab53e1 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 @@ -5,8 +5,10 @@ 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.ComponentVersionDetails; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -14,33 +16,37 @@ /** 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-10-01-preview/examples/Workspace/ComponentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Component Version. + * Sample code: CreateOrUpdate Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateComponentVersion( + public static void createOrUpdateWorkspaceComponentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager .componentVersions() - .define("string") - .withExistingComponent("test-rg", "my-aml-workspace", "string") - .withProperties( - new ComponentVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withComponentSpec( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", - Object.class, - SerializerEncoding.JSON))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new ComponentVersionInner() + .withProperties( + new ComponentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withComponentSpec( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", + Object.class, + SerializerEncoding.JSON))), + Context.NONE); } @SuppressWarnings("unchecked") 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 fc97506a5b55..2dfdd78ccfe8 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/ComponentVersion/delete.json */ /** - * Sample code: Delete Component Version. + * Sample code: Delete Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteComponentVersion( + public static void deleteWorkspaceComponentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java index bc8884e51649..fa7a9b5dd4f2 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ComponentVersion/get.json */ /** - * Sample code: Get Component Version. + * Sample code: Get Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java index 24bfff55e286..997102e8545a 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ComponentVersion/list.json */ /** - * Sample code: List Component Version. + * Sample code: List Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentVersions() .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java index 10e44a1114e6..c728123b546c 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 @@ -12,29 +12,42 @@ import com.azure.resourcemanager.machinelearning.models.AssignedUser; import com.azure.resourcemanager.machinelearning.models.ComputeInstance; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings; 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.MlflowAutologger; 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-10-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. @@ -52,7 +65,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-10-01-preview/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. @@ -75,7 +88,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-10-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -112,7 +125,40 @@ 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-10-01-preview/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + */ + /** + * Sample code: Create an ComputeInstance Compute with Schedules. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createAnComputeInstanceComputeWithSchedules( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .computes() + .define("compute123") + .withExistingWorkspace("testrg123", "workspaces123") + .withRegion("eastus") + .withProperties( + new ComputeInstance() + .withProperties( + new ComputeInstanceProperties() + .withVmSize("STANDARD_NC6") + .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) + .withSshSettings( + new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) + .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) + .withPersonalComputeInstanceSettings( + new PersonalComputeInstanceSettings() + .withAssignedUser( + new AssignedUser() + .withObjectId("00000000-0000-0000-0000-000000000000") + .withTenantId("00000000-0000-0000-0000-000000000000"))))) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -148,7 +194,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-10-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -169,8 +215,46 @@ public static void createAnComputeInstanceCompute( .withVmSize("STANDARD_NC6") .withSubnet(new ResourceId().withId("test-subnet-resource-id")) .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) + .withAutologgerSettings( + new ComputeInstanceAutologgerSettings().withMlflowAutologger(MlflowAutologger.ENABLED)) .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 +266,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-10-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -202,7 +286,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-10-01-preview/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -229,7 +313,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-10-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 946a49b31163..1875aff699a9 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-10-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 315fc0b9667e..2967827a0ecc 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-10-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-10-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-10-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-10-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 47910d43d61d..817aef94dd49 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-10-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 c0804e8830f8..f821394148df 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-10-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 e934364e5361..a6f56788b631 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-10-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 24446e5c0afe..ff9e5cc07886 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-10-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 4dffc86033dd..53344d3fee01 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-10-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 97a2961ce90d..1aac2b359284 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-10-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 000000000000..44d01304c268 --- /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-10-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 000000000000..97a12beeb356 --- /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-10-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 aa62d2b89740..9b5a838ce0f6 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-10-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 2a455cb7025e..48e17ce11ff4 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,25 +12,25 @@ /** 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-10-01-preview/examples/Workspace/DataContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Data Container. + * Sample code: CreateOrUpdate Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDataContainer( + public static void createOrUpdateWorkspaceDataContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataContainers() .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 6677dbc8a623..aa7e650f83c3 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/DataContainer/delete.json */ /** - * Sample code: Delete Data Container. + * Sample code: Delete Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataContainers().deleteWithResponse("testrg123", "workspace123", "datacontainer123", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java index 13a752ba4e0a..e383c41add7c 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/DataContainer/get.json */ /** - * Sample code: Get Data Container. + * Sample code: Get Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataContainers().getWithResponse("testrg123", "workspace123", "datacontainer123", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java index 9615c1761d32..e9392c5a7ee2 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/DataContainer/list.json */ /** - * Sample code: List Data Container. + * Sample code: List Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataContainers().list("testrg123", "workspace123", null, null, Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java index b63f9f6aca9a..bf1bfd22595e 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,14 +11,14 @@ /** 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-10-01-preview/examples/Workspace/DataVersionBase/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Data Version Base. + * Sample code: CreateOrUpdate Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDataVersionBase( + public static void createOrUpdateWorkspaceDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() 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 9a2828b9b5f2..adb4006a1143 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/DataVersionBase/delete.json */ /** - * Sample code: Delete Data Version Base. + * Sample code: Delete Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java index 3ea2798ad6ee..97272b07d7b3 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/DataVersionBase/get.json */ /** - * Sample code: Get Data Version Base. + * Sample code: Get Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void getDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java index e2998d0c46a2..d24258f473d4 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/DataVersionBase/list.json */ /** - * Sample code: List Data Version Base. + * Sample code: List Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void listDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() .list("test-rg", "my-aml-workspace", "string", "string", 1, null, "string", null, Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java index d01c90354593..ad97ae02e12b 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-10-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-10-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-10-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-10-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 048a0689cb9a..7c532402c2e8 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-10-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 362b7d544384..6660fec38de3 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-10-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 6d6bfc02cfba..a9c2e03f780b 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-10-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 6c73e14c3579..f576f0991afb 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-10-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 a1164dbfb388..3b3882b79acd 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,34 +4,51 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/EnvironmentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Environment Container. + * Sample code: CreateOrUpdate Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentContainer( + public static void createOrUpdateWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new EnvironmentContainerDetails() - .withDescription("string") + .createOrUpdateWithResponse( + "testrg123", + "testworkspace", + "testEnvironment", + new EnvironmentContainerInner() .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); + new EnvironmentContainerProperties() + .withDescription("string") + .withProperties( + mapOf( + "additionalProp1", + "string", + "additionalProp2", + "string", + "additionalProp3", + "string")) + .withTags( + mapOf( + "additionalProp1", + "string", + "additionalProp2", + "string", + "additionalProp3", + "string"))), + Context.NONE); } @SuppressWarnings("unchecked") 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 d82d3bc9a1eb..5dde7469f76c 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/EnvironmentContainer/delete.json */ /** - * Sample code: Delete Environment Container. + * Sample code: Delete Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentContainer( + public static void deleteWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentContainers().deleteWithResponse("testrg123", "testworkspace", "testContainer", Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java index 234e62e20f55..a41a1839350b 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/EnvironmentContainer/get.json */ /** - * Sample code: Get Environment Container. + * Sample code: Get Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentContainer( + public static void getWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentContainers().getWithResponse("testrg123", "testworkspace", "testEnvironment", Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java index 4d98d298ac4d..24cb8c6bf4da 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/EnvironmentContainer/list.json */ /** - * Sample code: List Environment Container. + * Sample code: List Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentContainer( + public static void listWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentContainers().list("testrg123", "testworkspace", null, null, Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java index 895d59ee9e49..6dabbff693ed 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 @@ -4,8 +4,10 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; 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,38 +16,42 @@ /** 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-10-01-preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Environment Version. + * Sample code: CreateOrUpdate Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentVersion( + public static void createOrUpdateWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() - .define("string") - .withExistingEnvironment("test-rg", "my-aml-workspace", "string") - .withProperties( - new EnvironmentVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withBuild( - new BuildContext() - .withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withCondaFile("string") - .withImage("docker.io/tensorflow/serving:latest") - .withInferenceConfig( - new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("string").withPort(1)) - .withReadinessRoute(new Route().withPath("string").withPort(1)) - .withScoringRoute(new Route().withPath("string").withPort(1)))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new EnvironmentVersionInner() + .withProperties( + new EnvironmentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild( + new BuildContext() + .withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))), + Context.NONE); } @SuppressWarnings("unchecked") 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 6b75b32b0a58..a0860bb29408 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/EnvironmentVersion/delete.json */ /** - * Sample code: Delete Environment Version. + * Sample code: Delete Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentVersion( + public static void deleteWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() 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 e4ef8171ec78..578461017a7e 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/EnvironmentVersion/get.json */ /** - * Sample code: Get Environment Version. + * Sample code: Get Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java index 36b3677194fa..0fc11dee2e4c 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/EnvironmentVersion/list.json */ /** - * Sample code: List Environment Version. + * Sample code: List Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentVersion( + public static void listWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() 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 e6df172f25aa..2586f01c067c 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-10-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 a9e4a13e060e..a94bc5dba9fb 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 @@ -8,35 +8,32 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.machinelearning.models.AmlToken; import com.azure.resourcemanager.machinelearning.models.AutoMLJob; +import com.azure.resourcemanager.machinelearning.models.AutologgerSettings; 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.MLFlowAutologgerState; import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; import com.azure.resourcemanager.machinelearning.models.Mpi; import com.azure.resourcemanager.machinelearning.models.Objective; import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import com.azure.resourcemanager.machinelearning.models.ResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; import com.azure.resourcemanager.machinelearning.models.SweepJob; import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import com.azure.resourcemanager.machinelearning.models.TrainingDataSettings; import com.azure.resourcemanager.machinelearning.models.TrialComponent; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +41,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-10-01-preview/examples/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -67,13 +64,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 +82,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 +96,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-10-01-preview/examples/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -171,7 +158,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 +174,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-10-01-preview/examples/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -232,7 +219,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-10-01-preview/examples/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -262,6 +249,8 @@ public static void createOrUpdateCommandJob( .withJobServiceType("string") .withPort(1) .withProperties(mapOf("string", "string")))) + .withAutologgerSettings( + new AutologgerSettings().withMlflowAutologger(MLFlowAutologgerState.ENABLED)) .withCodeId("string") .withCommand("string") .withDistribution(new TensorFlow().withParameterServerCount(1).withWorkerCount(1)) @@ -277,7 +266,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 2f4693836fa9..5718e6175f60 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-10-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 15b7b3b2ead5..83322d73f30a 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-10-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-10-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-10-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-10-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 e4847e10f084..a5115810938c 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-10-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-10-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-10-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-10-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 000000000000..866d3b40e1fe --- /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-10-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 000000000000..72ae83123ef0 --- /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-10-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 000000000000..924d96aa190c --- /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-10-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 000000000000..2371de3c3828 --- /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-10-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 000000000000..db2bcfeb9dd0 --- /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-10-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 000000000000..d1b56924737f --- /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-10-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 000000000000..903b42526b58 --- /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-10-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 9e3ef93b9261..30e168665126 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,31 +4,36 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.ModelContainerDetails; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; import java.util.HashMap; import java.util.Map; /** Samples for 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-10-01-preview/examples/Workspace/ModelContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Container. + * Sample code: CreateOrUpdate Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelContainer( + public static void createOrUpdateWorkspaceModelContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties( - new ModelContainerDetails() - .withDescription("Model container description") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "workspace123", + "testContainer", + new ModelContainerInner() + .withProperties( + new ModelContainerProperties() + .withDescription("Model container description") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))), + Context.NONE); } @SuppressWarnings("unchecked") 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 cef9bf1c56c9..910fb98ed2b0 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ModelContainer/delete.json */ /** - * Sample code: Delete Model Container. + * Sample code: Delete Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelContainers().deleteWithResponse("testrg123", "workspace123", "testContainer", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java index 9a468e4f8c67..b1c22b89765a 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ModelContainer/get.json */ /** - * Sample code: Get Model Container. + * Sample code: Get Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelContainers().getWithResponse("testrg123", "workspace123", "testContainer", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java index 2f03b11e3632..3176028859f7 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ModelContainer/list.json */ /** - * Sample code: List Model Container. + * Sample code: List Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelContainers().list("testrg123", "workspace123", null, null, null, Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java index 4182de281143..2465e730f50b 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 @@ -4,38 +4,43 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; 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-10-01-preview/examples/Workspace/ModelVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Version. + * Sample code: CreateOrUpdate Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelVersion( + public static void createOrUpdateWorkspaceModelVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelVersions() - .define("string") - .withExistingModel("test-rg", "my-aml-workspace", "string") - .withProperties( - new ModelVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType(ModelType.CUSTOM_MODEL) - .withModelUri("string")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new ModelVersionInner() + .withProperties( + new ModelVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) + .withModelType("CustomModel") + .withModelUri("string")), + Context.NONE); } @SuppressWarnings("unchecked") 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 5abcd0f8d1db..88e0d6fbadda 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ModelVersion/delete.json */ /** - * Sample code: Delete Model Version. + * Sample code: Delete Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java index 78aff7dce52d..997a7a0d2e33 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ModelVersion/get.json */ /** - * Sample code: Get Model Version. + * Sample code: Get Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java index 921cc20186a1..9385fe945fb3 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/ModelVersion/list.json */ /** - * Sample code: List Model Version. + * Sample code: List Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelVersions() .list( 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 ce44ed335916..8bf557bca56f 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-10-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-10-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 bdb98001c5bd..c95c501ab8a5 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/OnlineDeployment/delete.json */ /** - * Sample code: Delete Online Deployment. + * Sample code: Delete Workspace Online Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineDeployment( + public static void deleteWorkspaceOnlineDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineDeployments().delete("testrg123", "workspace123", "testEndpoint", "testDeployment", Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java index adefe6402f01..85b5c49b4d32 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-10-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 5884827c3109..72bcd183a2f1 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-10-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-10-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 8e453a170fff..338efbaddbe3 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-10-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 09e54d256445..f092592ac355 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-10-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-10-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 3dff73c3bfa2..2b740bbbf224 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-10-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-10-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 618d1d9e5d70..3674f90cab22 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,14 +17,14 @@ /** 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-10-01-preview/examples/Workspace/OnlineEndpoint/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Online Endpoint. + * Sample code: CreateOrUpdate Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateOnlineEndpoint( + public static void createOrUpdateWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() @@ -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 c0fd01296b3b..5b565cfbfa8d 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/OnlineEndpoint/delete.json */ /** - * Sample code: Delete Online Endpoint. + * Sample code: Delete Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineEndpoints().delete("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java index 8edd8ba5add5..0bc9ecc8ecd4 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,14 +9,15 @@ /** 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-10-01-preview/examples/Workspace/OnlineEndpoint/get.json */ /** - * Sample code: Get Online Endpoint. + * Sample code: Get Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineEndpoints().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java index 3707e6893a62..a38c8b039546 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/OnlineEndpoint/getToken.json */ /** - * Sample code: GetToken Online Endpoint. + * Sample code: GetToken Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getTokenOnlineEndpoint( + public static void getTokenWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineEndpoints().getTokenWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java index 59d2d9bd2be7..dfb514c66a13 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,14 +9,14 @@ /** 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-10-01-preview/examples/Workspace/OnlineEndpoint/listKeys.json */ /** - * Sample code: ListKeys Online Endpoint. + * Sample code: ListKeys Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysOnlineEndpoint( + public static void listKeysWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.onlineEndpoints().listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java index bf76e04c91c3..dc2c7cd4323c 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,14 +11,15 @@ /** 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-10-01-preview/examples/Workspace/OnlineEndpoint/list.json */ /** - * Sample code: List Online Endpoint. + * Sample code: List Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() .list( 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 1d9abdecc725..aaa5caeaf457 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,14 +11,14 @@ /** 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-10-01-preview/examples/Workspace/OnlineEndpoint/regenerateKeys.json */ /** - * Sample code: RegenerateKeys Online Endpoint. + * Sample code: RegenerateKeys Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void regenerateKeysOnlineEndpoint( + public static void regenerateKeysWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() 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 9c28f07a0c0e..1a3745e15470 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,16 +17,16 @@ /** 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-10-01-preview/examples/Workspace/OnlineEndpoint/update.json */ /** - * Sample code: Update Online Endpoint. + * Sample code: Update Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - OnlineEndpointData resource = + public static void updateWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + 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 9f6e24ddf75b..6429c8775e8f 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-10-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 adae22be8eef..57e10b743d38 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-10-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 d3c1d5fb9cd7..7092193670f3 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-10-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 ca77172dacf6..f29ce3e56518 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-10-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 8a19dca8e692..d77a25d1698e 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-10-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 6856fcce03df..d0cebbfcd48a 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-10-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 d8b5cac81338..fb4e1b69b0f5 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-10-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 858972271aaa..f6f351e402de 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-10-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/RegistriesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..721bc01c78d9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.AcrDetails; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.RegistryProperties; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries CreateOrUpdate. */ +public final class RegistriesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/createOrUpdate-SystemCreated.json + */ + /** + * Sample code: CreateOrUpdate Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .define("string") + .withRegion("string") + .withExistingResourceGroup("test-rg") + .withProperties( + new RegistryProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount() + .withAcrAccountSku("string") + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string")) + .withStorageAccountHnsEnabled(false) + .withStorageAccountType("string"))))))) + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.BASIC) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/createOrUpdate-UserCreated.json + */ + /** + * Sample code: CreateOrUpdate Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .define("string") + .withRegion("string") + .withExistingResourceGroup("test-rg") + .withProperties( + new RegistryProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withUserCreatedAcrAccount( + new UserCreatedAcrAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withUserCreatedStorageAccount( + new UserCreatedStorageAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string")))))))) + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.BASIC) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java new file mode 100644 index 000000000000..054127213703 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.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 Registries Delete. */ +public final class RegistriesDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/delete.json + */ + /** + * Sample code: Delete Registry. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistry(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().deleteWithResponse("test-rg", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..755afe57b4a6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 Registries GetByResourceGroup. */ +public final class RegistriesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/get-UserCreated.json + */ + /** + * Sample code: Get Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().getByResourceGroupWithResponse("test-rg", "string", Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/get-SystemCreated.json + */ + /** + * Sample code: Get Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().getByResourceGroupWithResponse("test-rg", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java new file mode 100644 index 000000000000..1eff46f3bcde --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 Registries ListByResourceGroup. */ +public final class RegistriesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/list-UserCreated.json + */ + /** + * Sample code: List registries with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().listByResourceGroup("test-rg", null, Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/list-SystemCreated.json + */ + /** + * Sample code: List registries with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().listByResourceGroup("test-rg", null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java new file mode 100644 index 000000000000..0ef86a0f15f0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.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 Registries List. */ +public final class RegistriesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/listBySubscription.json + */ + /** + * Sample code: List registries. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistries(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().list(null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java new file mode 100644 index 000000000000..43e703818fd6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Registry; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries Update. */ +public final class RegistriesUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/update-UserCreated.json + */ + /** + * Sample code: Update Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + Registry resource = + manager.registries().getByResourceGroupWithResponse("test-rg", "string", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new PartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "string", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withKind("string") + .withProperties( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.PREMIUM)) + .apply(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registries/update-SystemCreated.json + */ + /** + * Sample code: Update Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + Registry resource = + manager.registries().getByResourceGroupWithResponse("test-rg", "string", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new PartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "string", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withKind("string") + .withProperties( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.PREMIUM)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..8da53a954302 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryCodeContainers CreateOrUpdate. */ +public final class RegistryCodeContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeContainers() + .define("testContainer") + .withExistingRegistry("testrg123", "testregistry") + .withProperties( + new CodeContainerProperties() + .withDescription("string") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java new file mode 100644 index 000000000000..7c7a7b3bd34b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryCodeContainers Delete. */ +public final class RegistryCodeContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeContainer/delete.json + */ + /** + * Sample code: Delete Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeContainers().delete("testrg123", "testregistry", "testContainer", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java new file mode 100644 index 000000000000..0e0cbae7d2c5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryCodeContainers Get. */ +public final class RegistryCodeContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeContainer/get.json + */ + /** + * Sample code: Get Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeContainers().getWithResponse("testrg123", "testregistry", "testContainer", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java new file mode 100644 index 000000000000..74eb9f1a25e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryCodeContainers List. */ +public final class RegistryCodeContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeContainer/list.json + */ + /** + * Sample code: List Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeContainers().list("testrg123", "testregistry", null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..7c1e21dcbde7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryCodeVersions CreateOrUpdate. */ +public final class RegistryCodeVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .define("string") + .withExistingCode("test-rg", "my-aml-registry", "string") + .withProperties( + new CodeVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withCodeUri("https://blobStorage/folderName")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java new file mode 100644 index 000000000000..cbafe519c004 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryCodeVersions Delete. */ +public final class RegistryCodeVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeVersion/delete.json + */ + /** + * Sample code: Delete Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeVersions().delete("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java new file mode 100644 index 000000000000..5f230cdfb244 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryCodeVersions Get. */ +public final class RegistryCodeVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeVersion/get.json + */ + /** + * Sample code: Get Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeVersions().getWithResponse("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java new file mode 100644 index 000000000000..2fadef7666e0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryCodeVersions List. */ +public final class RegistryCodeVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/CodeVersion/list.json + */ + /** + * Sample code: List Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeVersions().list("test-rg", "my-aml-registry", "string", "string", 1, null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..613d2808cd74 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryComponentContainers CreateOrUpdate. */ +public final class RegistryComponentContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentContainers() + .define("string") + .withExistingRegistry("test-rg", "my-aml-registry") + .withProperties( + new ComponentContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java new file mode 100644 index 000000000000..c5096ce4bd78 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryComponentContainers Delete. */ +public final class RegistryComponentContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentContainer/delete.json + */ + /** + * Sample code: Delete Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryComponentContainers().delete("test-rg", "my-aml-registry", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java new file mode 100644 index 000000000000..049338131bbe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryComponentContainers Get. */ +public final class RegistryComponentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentContainer/get.json + */ + /** + * Sample code: Get Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryComponentContainers().getWithResponse("test-rg", "my-aml-registry", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java new file mode 100644 index 000000000000..936414878eea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryComponentContainers List. */ +public final class RegistryComponentContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentContainer/list.json + */ + /** + * Sample code: List Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryComponentContainers().list("test-rg", "my-aml-registry", null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..c2515b7bf4d9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.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.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryComponentVersions CreateOrUpdate. */ +public final class RegistryComponentVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager + .registryComponentVersions() + .define("string") + .withExistingComponent("test-rg", "my-aml-registry", "string") + .withProperties( + new ComponentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withComponentSpec( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", + Object.class, + SerializerEncoding.JSON))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java new file mode 100644 index 000000000000..191a75fb4e74 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryComponentVersions Delete. */ +public final class RegistryComponentVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentVersion/delete.json + */ + /** + * Sample code: Delete Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryComponentVersions().delete("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java new file mode 100644 index 000000000000..78aecc31aa4f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryComponentVersions Get. */ +public final class RegistryComponentVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentVersion/get.json + */ + /** + * Sample code: Get Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java new file mode 100644 index 000000000000..a4388eb4501d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryComponentVersions List. */ +public final class RegistryComponentVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ComponentVersion/list.json + */ + /** + * Sample code: List Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentVersions() + .list("test-rg", "my-aml-registry", "string", "string", 1, null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..840c62170fe0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryEnvironmentContainers CreateOrUpdate. */ +public final class RegistryEnvironmentContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .define("testEnvironment") + .withExistingRegistry("testrg123", "testregistry") + .withProperties( + new EnvironmentContainerProperties() + .withDescription("string") + .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java new file mode 100644 index 000000000000..de7b38ab469a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryEnvironmentContainers Delete. */ +public final class RegistryEnvironmentContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentContainer/delete.json + */ + /** + * Sample code: Delete Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryEnvironmentContainers().delete("testrg123", "testregistry", "testContainer", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java new file mode 100644 index 000000000000..09c4146796f9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryEnvironmentContainers Get. */ +public final class RegistryEnvironmentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentContainer/get.json + */ + /** + * Sample code: Get Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .getWithResponse("testrg123", "testregistry", "testEnvironment", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java new file mode 100644 index 000000000000..4987f68be4b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryEnvironmentContainers List. */ +public final class RegistryEnvironmentContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentContainer/list.json + */ + /** + * Sample code: List Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryEnvironmentContainers().list("testrg123", "testregistry", null, null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e6a348d03093 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.BuildContext; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; +import com.azure.resourcemanager.machinelearning.models.Route; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryEnvironmentVersions CreateOrUpdate. */ +public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .define("string") + .withExistingEnvironment("test-rg", "my-aml-registry", "string") + .withProperties( + new EnvironmentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild( + new BuildContext() + .withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java new file mode 100644 index 000000000000..9f004a058d89 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryEnvironmentVersions Delete. */ +public final class RegistryEnvironmentVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentVersion/delete.json + */ + /** + * Sample code: Delete Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryEnvironmentVersions().delete("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java new file mode 100644 index 000000000000..d40b0c5e2134 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryEnvironmentVersions Get. */ +public final class RegistryEnvironmentVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentVersion/get.json + */ + /** + * Sample code: Get Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java new file mode 100644 index 000000000000..618235e2b450 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryEnvironmentVersions List. */ +public final class RegistryEnvironmentVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/EnvironmentVersion/list.json + */ + /** + * Sample code: List Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .list("test-rg", "my-aml-regsitry", "string", "string", 1, null, null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..adfd03c62379 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryModelContainers CreateOrUpdate. */ +public final class RegistryModelContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelContainers() + .define("testContainer") + .withExistingRegistry("testrg123", "registry123") + .withProperties( + new ModelContainerProperties() + .withDescription("Model container description") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java new file mode 100644 index 000000000000..e49d6f6a024f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryModelContainers Delete. */ +public final class RegistryModelContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelContainer/delete.json + */ + /** + * Sample code: Delete Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelContainers().delete("testrg123", "registry123", "testContainer", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java new file mode 100644 index 000000000000..f4cca1a57bde --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryModelContainers Get. */ +public final class RegistryModelContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelContainer/get.json + */ + /** + * Sample code: Get Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelContainers().getWithResponse("testrg123", "registry123", "testContainer", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java new file mode 100644 index 000000000000..e2325f6b37e8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryModelContainers List. */ +public final class RegistryModelContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelContainer/list.json + */ + /** + * Sample code: List Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelContainers().list("testrg123", "registry123", null, null, Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..481c96582b56 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.FlavorData; +import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryModelVersions CreateOrUpdate. */ +public final class RegistryModelVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .define("string") + .withExistingModel("test-rg", "my-aml-registry", "string") + .withProperties( + new ModelVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) + .withModelType("CustomModel") + .withModelUri("string")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java new file mode 100644 index 000000000000..45f5ef79b64c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryModelVersions Delete. */ +public final class RegistryModelVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelVersion/delete.json + */ + /** + * Sample code: Delete Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelVersions().delete("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java new file mode 100644 index 000000000000..a9b01ebeec0e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryModelVersions Get. */ +public final class RegistryModelVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelVersion/get.json + */ + /** + * Sample code: Get Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelVersions().getWithResponse("test-rg", "my-aml-registry", "string", "string", Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java new file mode 100644 index 000000000000..8370f60e0837 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 RegistryModelVersions List. */ +public final class RegistryModelVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-10-01-preview/examples/Registry/ModelVersion/list.json + */ + /** + * Sample code: List Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .list( + "test-rg", + "my-aml-registry", + "string", + null, + "string", + 1, + "string", + "string", + "string", + "string", + null, + Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..7242255fc917 --- /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-10-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 000000000000..adcaa7de6a46 --- /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-10-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 000000000000..5a34d9455362 --- /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-10-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 000000000000..b0cdddd235bb --- /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-10-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, 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 be1aaf51c237..c918fcbbb78b 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-10-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 2419e5ae92a0..528d8c3a096e 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-10-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 491234c7d941..35fa5ebba371 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,12 @@ package com.azure.resourcemanager.machinelearning.generated; +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-10-01-preview/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -20,10 +22,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("ContainerRegistry") + .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 87562608439c..93d9c9249413 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-10-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 53c250dcd90b..393f0bd0002c 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-10-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 6277f375754f..2c72a3a914e6 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-10-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 cb6c47bf13dd..13fd8da36d5f 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-10-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 b4e2b9f950d4..df5b1e7ff425 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-10-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 1aef475b3992..1fc7d81dd927 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-10-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 5b33bfb24009..54c7472a4399 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-10-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 bb84f84805f1..b8894041b6d3 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-10-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 f5f83077eb3d..0d1bf3135656 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-10-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 df4927c6259a..a80440e718c6 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-10-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 34f02920a33b..86870472734a 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-10-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 5ab643e5d4d7..2b9dfb90484c 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-10-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 72632cc48754..1a89aea9b7e1 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-10-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 e6fcdfa952b8..7035c173f3a5 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-10-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 c9800f875ebe..b880b2f92abf 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-10-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 64f0f16a6cbb..3560003a2522 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-10-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 4871b9e5f709..81fbe6a554e3 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-10-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 3cffa00b21bc..6e9e50b393ae 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-10-01-preview/examples/Workspace/update.json */ /** * Sample code: Update Workspace.