diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md index f4d8ab12ac0c..24618dcdb11f 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-10-28) + +- 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..40cef2cd482b 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().deleteByResourceGroupWithResponse("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 b0c3c3cb2892..4aec815e10cc 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..f2ba7f59facb 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, @@ -125,14 +125,15 @@ void delete( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. * @param deploymentName The identifier for the Batch deployments. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. + * @return a batch inference deployment by id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentDataInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); /** * Gets a batch inference deployment by id. @@ -141,15 +142,14 @@ BatchDeploymentDataInner get( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. + * @return a batch inference deployment by id. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + BatchDeploymentInner get( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** * Update a batch inference deployment (asynchronous). @@ -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..4f335ddcec44 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); /** @@ -110,13 +110,15 @@ SyncPoller, Void> beginDelete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. + * @return a batch inference endpoint by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * Gets a batch inference endpoint by name. @@ -124,15 +126,13 @@ SyncPoller, Void> beginDelete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. + * @return a batch inference endpoint by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); /** * Update a batch inference endpoint (asynchronous). @@ -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. @@ -294,13 +286,15 @@ BatchEndpointDataInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); + Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * Lists batch Inference Endpoint keys. @@ -308,13 +302,11 @@ BatchEndpointDataInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. + * @return keys for endpoint authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java index 03d7ba0721be..04fdda11a577 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); /** @@ -48,12 +48,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Delete container. @@ -61,14 +63,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -76,13 +76,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerDataInner get(String resourceGroupName, String workspaceName, String name); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); /** * Get container. @@ -90,15 +92,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + CodeContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Create or update container. @@ -107,14 +107,15 @@ Response getWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context); /** * Create or update container. @@ -123,13 +124,12 @@ CodeContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body, Context context); + CodeContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java index da65902f46c4..fa5b5e3a4469 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, @@ -59,12 +59,15 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Delete version. @@ -73,15 +76,12 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -90,13 +90,15 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Get version. @@ -105,15 +107,13 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Create or update version. @@ -123,14 +123,20 @@ Response getWithResponse( * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + CodeVersionInner body, + Context context); /** * Create or update version. @@ -140,18 +146,12 @@ CodeVersionDataInner createOrUpdate( * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Version entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionDataInner body, - Context context); + CodeVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java index eb2edf8ff681..0f44fde086c8 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); /** @@ -50,12 +50,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Delete container. @@ -63,14 +65,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -78,13 +78,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerDataInner get(String resourceGroupName, String workspaceName, String name); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); /** * Get container. @@ -92,15 +94,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + ComponentContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Create or update container. @@ -109,14 +109,15 @@ Response getWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context); /** * Create or update container. @@ -125,13 +126,12 @@ ComponentContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner body, Context context); + ComponentContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java index a1f3e0bae9ec..c1374059eaa0 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, @@ -62,12 +62,15 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Delete version. @@ -76,15 +79,12 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -93,13 +93,15 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Get version. @@ -108,15 +110,13 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Create or update version. @@ -126,14 +126,20 @@ Response getWithResponse( * @param name Container name. * @param version Version identifier. * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ComponentVersionInner body, + Context context); /** * Create or update version. @@ -143,18 +149,12 @@ ComponentVersionDataInner createOrUpdate( * @param name Container name. * @param version Version identifier. * @param body Version entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ComponentVersionDataInner body, - Context context); + ComponentVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java index 59109ed677d3..c231832b90dd 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 { @@ -55,13 +58,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. + * @return compute definition by its name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String computeName, Context context); /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use @@ -70,15 +75,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response}. + * @return compute definition by its name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); + ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName); /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. @@ -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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -357,13 +396,16 @@ PagedIterable listNodes( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName); + Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String computeName, Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). @@ -371,16 +413,13 @@ PagedIterable listNodes( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); + ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName); /** * Posts a start action to a compute instance. @@ -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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); } 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..ac1a5e333193 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); /** @@ -50,12 +50,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Delete container. @@ -63,14 +65,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -78,13 +78,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerDataInner get(String resourceGroupName, String workspaceName, String name); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); /** * Get container. @@ -92,15 +94,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + DataContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Create or update container. @@ -109,14 +109,15 @@ Response getWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context); /** * Create or update container. @@ -125,13 +126,12 @@ DataContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body, Context context); + DataContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, DataContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java index f7aa9b60dbda..bf43827ba11f 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, @@ -66,12 +66,15 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Delete version. @@ -80,15 +83,12 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -97,13 +97,15 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseDataInner get(String resourceGroupName, String workspaceName, String name, String version); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Get version. @@ -112,15 +114,13 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Create or update version. @@ -130,14 +130,20 @@ Response getWithResponse( * @param name Container name. * @param version Version identifier. * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + DataVersionBaseInner body, + Context context); /** * Create or update version. @@ -147,18 +153,12 @@ DataVersionBaseDataInner createOrUpdate( * @param name Container name. * @param version Version identifier. * @param body Version entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - DataVersionBaseDataInner body, - Context context); + DataVersionBaseInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java index 039579d9f50f..ca474d283aa2 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, @@ -59,19 +59,6 @@ PagedIterable list( Boolean orderByAsc, Context context); - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - /** * Delete datastore. * @@ -88,7 +75,7 @@ PagedIterable list( Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get datastore. + * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -96,10 +83,9 @@ 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 datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreDataInner get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get datastore. @@ -114,24 +100,22 @@ PagedIterable list( * @return datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Create or update datastore. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. - * @param body Datastore entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body); + DatastoreInner get(String resourceGroupName, String workspaceName, String name); /** * Create or update datastore. @@ -148,27 +132,28 @@ 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); /** - * Get datastore secrets. + * Create or update datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. + * @param body Datastore entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name); + DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, DatastoreInner body); /** * Get datastore secrets. @@ -185,4 +170,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listSecretsWithResponse( String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get datastore secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Datastore name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return datastore secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java index 2585f01d46cd..1719267cb0ca 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); /** @@ -50,12 +50,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Delete container. @@ -63,14 +65,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -78,13 +78,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerDataInner get(String resourceGroupName, String workspaceName, String name); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); /** * Get container. @@ -92,15 +94,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Create or update container. @@ -109,14 +109,15 @@ Response getWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context); /** * Create or update container. @@ -125,17 +126,12 @@ EnvironmentContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - EnvironmentContainerDataInner body, - Context context); + EnvironmentContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java index ee7be12767ad..9b6667f2237e 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, @@ -62,12 +62,15 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Delete version. @@ -76,15 +79,12 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -93,13 +93,15 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Get version. @@ -108,15 +110,13 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Creates or updates an EnvironmentVersion. @@ -126,14 +126,20 @@ Response getWithResponse( * @param name Name of EnvironmentVersion. This is case-sensitive. * @param version Version of EnvironmentVersion. * @param body Definition of EnvironmentVersion. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + EnvironmentVersionInner body, + Context context); /** * Creates or updates an EnvironmentVersion. @@ -143,18 +149,12 @@ EnvironmentVersionDataInner createOrUpdate( * @param name Name of EnvironmentVersion. This is case-sensitive. * @param version Version of EnvironmentVersion. * @param body Definition of EnvironmentVersion. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - EnvironmentVersionDataInner body, - Context context); + EnvironmentVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java index 6d280d7c1f6f..28d4af1f131d 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, @@ -121,13 +121,14 @@ SyncPoller, Void> beginDelete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id. + * @return a Job by name/id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseDataInner get(String resourceGroupName, String workspaceName, String id); + Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); /** * Gets a Job by name/id. @@ -135,15 +136,13 @@ SyncPoller, Void> beginDelete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. + * @return a Job by name/id. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String id, Context context); + JobBaseInner get(String resourceGroupName, String workspaceName, String id); /** * Creates and executes a Job. @@ -152,13 +151,15 @@ Response getWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. * @param body Job definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseDataInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context); /** * Creates and executes a Job. @@ -167,18 +168,46 @@ Response getWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. * @param body Job definition object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body, Context context); + JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body); + + /** + * Cancels a Job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the Job. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id); + + /** + * Cancels a Job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCancel( + String resourceGroupName, String workspaceName, String id, Context context); /** - * Cancels a Job. + * 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..2c143f95607c --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + + /** + * 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..980ec45c56a3 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, @@ -56,12 +56,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Delete container. @@ -69,14 +71,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -84,13 +84,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerDataInner get(String resourceGroupName, String workspaceName, String name); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); /** * Get container. @@ -98,15 +100,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + ModelContainerInner get(String resourceGroupName, String workspaceName, String name); /** * Create or update container. @@ -115,14 +115,15 @@ Response getWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context); /** * Create or update container. @@ -131,13 +132,12 @@ ModelContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body, Context context); + ModelContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java index 317537e9c843..92582d819da1 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, @@ -74,12 +74,15 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Delete version. @@ -88,15 +91,12 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -105,13 +105,15 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Get version. @@ -120,15 +122,13 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** * Create or update version. @@ -138,14 +138,20 @@ Response getWithResponse( * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionDataInner body); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ModelVersionInner body, + Context context); /** * Create or update version. @@ -155,18 +161,12 @@ ModelVersionDataInner createOrUpdate( * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Version entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionDataInner body, - Context context); + ModelVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java index 46bea196ac72..8b20629178a8 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, @@ -128,14 +128,15 @@ void delete( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment. + * @return inference Deployment Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentDataInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); /** * Get Inference Deployment Deployment. @@ -144,15 +145,14 @@ OnlineDeploymentDataInner get( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. + * @return inference Deployment Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + OnlineDeploymentInner get( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** * Update Online Deployment (asynchronous). @@ -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); /** @@ -338,18 +338,20 @@ OnlineDeploymentDataInner createOrUpdate( * @param endpointName Inference endpoint name. * @param deploymentName The name and identifier for the endpoint. * @param body The request containing parameters for retrieving logs. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentLogsInner getLogs( + Response getLogsWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - DeploymentLogsRequest body); + DeploymentLogsRequest body, + Context context); /** * Polls an Endpoint operation. @@ -359,20 +361,18 @@ DeploymentLogsInner getLogs( * @param endpointName Inference endpoint name. * @param deploymentName The name and identifier for the endpoint. * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getLogsWithResponse( + DeploymentLogsInner getLogs( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - DeploymentLogsRequest body, - Context context); + DeploymentLogsRequest body); /** * List Inference Endpoint Deployment Skus. 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..8b04958fc924 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, @@ -130,13 +130,15 @@ SyncPoller, Void> beginDelete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint. + * @return online Endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * Get Online Endpoint. @@ -144,15 +146,13 @@ SyncPoller, Void> beginDelete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. + * @return online Endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); /** * Update Online Endpoint (asynchronous). @@ -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. @@ -314,13 +306,15 @@ OnlineEndpointDataInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); + Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. @@ -328,15 +322,13 @@ OnlineEndpointDataInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. + * @return keys for endpoint authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). @@ -416,13 +408,15 @@ void regenerateKeys( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token. + * @return service Token along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthTokenInner getToken(String resourceGroupName, String workspaceName, String endpointName); + Response getTokenWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. @@ -430,13 +424,11 @@ void regenerateKeys( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token along with {@link Response}. + * @return service Token. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + EndpointAuthTokenInner getToken(String resourceGroupName, String workspaceName, String endpointName); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java 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/PrivateEndpointConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java index 33c18711080d..2b613c7f88e3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java @@ -48,14 +48,15 @@ public interface PrivateEndpointConnectionsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. + * @return the specified private endpoint connection associated with the workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** * Gets the specified private endpoint connection associated with the workspace. @@ -63,15 +64,14 @@ PrivateEndpointConnectionInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the specified private endpoint connection associated with the workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + PrivateEndpointConnectionInner get( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** * Update the state of specified private endpoint connection associated with the workspace. @@ -80,17 +80,19 @@ Response getWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. * @param properties The private endpoint connection properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties); + PrivateEndpointConnectionInner properties, + Context context); /** * Update the state of specified private endpoint connection associated with the workspace. @@ -99,19 +101,17 @@ PrivateEndpointConnectionInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response}. + * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + PrivateEndpointConnectionInner createOrUpdate( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties, - Context context); + PrivateEndpointConnectionInner properties); /** * Deletes the specified private endpoint connection associated with the workspace. @@ -119,12 +119,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** * Deletes the specified private endpoint connection associated with the workspace. @@ -132,13 +135,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java index 1da61216f1a5..1dc6edf69f64 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java @@ -17,26 +17,26 @@ public interface PrivateLinkResourcesClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. + * @return the private link resources that need to be created for a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets the private link resources that need to be created for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response}. + * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java index 7d2b47c28da7..f7d696e1bf38 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java @@ -20,28 +20,28 @@ public interface QuotasClient { * * @param location The location for update quota is queried. * @param parameters Quota update parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. + * @return the result of update workspace quota along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters); + Response updateWithResponse( + String location, QuotaUpdateParameters parameters, Context context); /** * Update quota for each VM family in workspace. * * @param location The location for update quota is queried. * @param parameters Quota update parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response}. + * @return the result of update workspace quota. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context); + UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters); /** * Gets the currently assigned Workspace Quotas based on VMFamily. 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..95d9a8da8fdd --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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..42c8a28385e4 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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); + + /** + * 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); + + /** + * 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..89574be7fc48 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..3197fdd9b318 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner get(String resourceGroupName, String registryName, String componentName); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..321e73f57f65 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..2c958ed581ed --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..319296cafbe3 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..0432dfff608c --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner get(String resourceGroupName, String registryName, String modelName); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..cd674f8a6e94 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..ad9f8256ddee --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schedule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schedule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScheduleInner get(String resourceGroupName, String workspaceName, String name); + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScheduleInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, ScheduleInner body); + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScheduleInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context); + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body); + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScheduleInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java index aea1510cb2e1..15b40d65457f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java @@ -16,24 +16,24 @@ public interface VirtualMachineSizesClient { * Returns supported VM Sizes in a location. * * @param location The location upon which virtual-machine-sizes is queried. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. + * @return the List Virtual Machine size operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineSizeListResultInner list(String location); + Response listWithResponse(String location, Context context); /** * Returns supported VM Sizes in a location. * * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response along with {@link Response}. + * @return the List Virtual Machine size operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String location, Context context); + VirtualMachineSizeListResultInner list(String location); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java index 9f057a3dd81f..442aaf6a5480 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,133 +9,138 @@ 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. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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); + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse( + String resourceGroupName, + String workspaceName, + String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner parameters, + 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 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 com.azure.core.management.exception.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, String target, String category, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceConnectionPropertiesV2BasicResourceInner create( + String resourceGroupName, + String workspaceName, + String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner parameters); /** - * 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. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionInner create( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters); + Response getWithResponse( + String resourceGroupName, String workspaceName, String connectionName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionInner parameters, - Context context); + WorkspaceConnectionPropertiesV2BasicResourceInner get( + 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. * @param connectionName Friendly name of the workspace connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionInner get(String resourceGroupName, String workspaceName, String connectionName); + Response deleteWithResponse( + 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. * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); + void delete(String resourceGroupName, String workspaceName, String connectionName); /** - * 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/WorkspacesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java index 6ebfdab961a3..2057cda2ab5a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java @@ -29,28 +29,28 @@ public interface WorkspacesClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. + * @return the properties of the specified machine learning workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. + * @return the properties of the specified machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); + WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); /** * Creates or updates a workspace with the specified parameters. @@ -259,7 +259,6 @@ WorkspaceInner update( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -267,7 +266,7 @@ WorkspaceInner update( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters); + String resourceGroupName, String workspaceName); /** * Diagnose workspace setup issue. @@ -285,21 +284,6 @@ SyncPoller, DiagnoseResponseResultInner> SyncPoller, DiagnoseResponseResultInner> beginDiagnose( String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnoseResponseResultInner diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters); - /** * Diagnose workspace setup issue. * @@ -335,13 +319,15 @@ DiagnoseResponseResultInner diagnose( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName); + Response listKeysWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and @@ -349,15 +335,13 @@ DiagnoseResponseResultInner diagnose( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); + ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName); /** * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and @@ -445,28 +429,28 @@ Response listKeysWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); + Response listNotebookAccessTokenWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * return notebook access token and refresh token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context); + NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); /** * Prepare a notebook. @@ -524,19 +508,6 @@ SyncPoller, NotebookResourceInfoInner> beg @ServiceMethod(returns = ReturnType.SINGLE) NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context); - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName); - /** * List storage account keys of a workspace. * @@ -553,7 +524,7 @@ Response listStorageAccountKeysWithResponse( String resourceGroupName, String workspaceName, Context context); /** - * List keys of a notebook. + * List storage account keys of a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -563,7 +534,7 @@ Response listStorageAccountKeysWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName); + ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName); /** * List keys of a notebook. @@ -581,7 +552,7 @@ Response listNotebookKeysWithResponse( String resourceGroupName, String workspaceName, Context context); /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * List keys of a notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -591,7 +562,7 @@ Response listNotebookKeysWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); + ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName); /** * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. @@ -607,4 +578,17 @@ Response listNotebookKeysWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listOutboundNetworkDependenciesEndpointsWithResponse( String resourceGroupName, String workspaceName, Context context); + + /** + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java index 1c3722828205..351abd4f5d19 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 { /* @@ -29,6 +29,10 @@ public final class AmlOperationInner { @JsonProperty(value = "isDataAction") private Boolean isDataAction; + /** Creates an instance of AmlOperationInner class. */ + public AmlOperationInner() { + } + /** * Get the name property: Operation name: {provider}/{resource}/{operation}. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java index 62790155c605..a089fbd59b95 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java @@ -28,6 +28,10 @@ public final class AmlUserFeatureInner { @JsonProperty(value = "description") private String description; + /** Creates an instance of AmlUserFeatureInner class. */ + public AmlUserFeatureInner() { + } + /** * Get the id property: Specifies the feature ID. * 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..3ec008adca64 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,12 +42,15 @@ 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; + /** Creates an instance of BatchDeploymentInner class. */ + public BatchDeploymentInner() { + } + /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * @@ -63,9 +64,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 +86,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 +98,7 @@ public BatchDeploymentDataInner withKind(String kind) { * * @return the properties value. */ - public BatchDeploymentDetails properties() { + public BatchDeploymentProperties properties() { return this.properties; } @@ -105,9 +106,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 +126,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 +144,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 +168,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 +177,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/BatchEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java new file mode 100644 index 000000000000..487307ea149b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The BatchEndpoint model. */ +@Fluent +public final class BatchEndpointInner extends Resource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private BatchEndpointProperties properties; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of BatchEndpointInner class. */ + public BatchEndpointInner() { + } + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @param identity the identity value to set. + * @return the BatchEndpointInner object itself. + */ + public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @param kind the kind value to set. + * @return the BatchEndpointInner object itself. + */ + public BatchEndpointInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public BatchEndpointProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the BatchEndpointInner object itself. + */ + public BatchEndpointInner withProperties(BatchEndpointProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku details required for ARM contract for Autoscaling. + * + * @param sku the sku value to set. + * @return the BatchEndpointInner object itself. + */ + public BatchEndpointInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public BatchEndpointInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public BatchEndpointInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model BatchEndpointInner")); + } else { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java index 842fae9579e3..4abc0bf1e9e1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java @@ -17,6 +17,10 @@ public final class ClusterUpdateProperties { @JsonProperty(value = "properties") private ScaleSettingsInformation properties; + /** Creates an instance of ClusterUpdateProperties class. */ + public ClusterUpdateProperties() { + } + /** * Get the properties property: Properties of ClusterUpdate. * 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 77% 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..627c39dd4d84 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,31 +8,34 @@ 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; + /** Creates an instance of CodeContainerInner class. */ + public CodeContainerInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public CodeContainerDetails properties() { + public CodeContainerProperties properties() { return this.properties; } @@ -40,9 +43,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 +68,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 80% 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..ec872c6209d1 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,31 +8,34 @@ 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; + /** Creates an instance of CodeVersionInner class. */ + public CodeVersionInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public CodeVersionDetails properties() { + public CodeVersionProperties properties() { return this.properties; } @@ -40,9 +43,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 +68,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/ComponentVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java similarity index 79% 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/ComponentContainerInner.java index ba2ad30514b2..cfcf51505906 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/ComponentContainerInner.java @@ -8,31 +8,34 @@ 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.ComponentContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class ComponentVersionDataInner extends ProxyResource { +public final class ComponentContainerInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private ComponentVersionDetails 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; + /** Creates an instance of ComponentContainerInner class. */ + public ComponentContainerInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public ComponentVersionDetails properties() { + public ComponentContainerProperties properties() { return this.properties; } @@ -40,9 +43,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 ComponentContainerInner object itself. */ - public ComponentVersionDataInner withProperties(ComponentVersionDetails properties) { + public ComponentContainerInner withProperties(ComponentContainerProperties properties) { this.properties = properties; return this; } @@ -66,11 +69,11 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model ComponentVersionDataInner")); + "Missing required property properties in model ComponentContainerInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ComponentVersionDataInner.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/ComponentContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java similarity index 79% 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/ComponentVersionInner.java index c947da16fd56..55676a9cd644 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/ComponentVersionInner.java @@ -8,31 +8,34 @@ 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.ComponentVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class ComponentContainerDataInner extends ProxyResource { +public final class ComponentVersionInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private ComponentContainerDetails 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; + /** Creates an instance of ComponentVersionInner class. */ + public ComponentVersionInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public ComponentContainerDetails properties() { + public ComponentVersionProperties properties() { return this.properties; } @@ -40,9 +43,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 ComponentVersionInner object itself. */ - public ComponentContainerDataInner withProperties(ComponentContainerDetails properties) { + public ComponentVersionInner withProperties(ComponentVersionProperties properties) { this.properties = properties; return this; } @@ -66,11 +69,11 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model ComponentContainerDataInner")); + "Missing required property properties in model ComponentVersionInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ComponentContainerDataInner.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..170e868b87e9 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; @@ -55,6 +54,10 @@ public final class ComputeResourceInner extends ProxyResource { @JsonProperty(value = "properties") private Compute properties; + /** Creates an instance of ComputeResourceInner class. */ + public ComputeResourceInner() { + } + /** * Get the identity property: The identity of the resource. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java index 6afbda4264ae..ad8ddc04d37d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java @@ -26,6 +26,10 @@ }) @Immutable public class ComputeSecretsInner { + /** Creates an instance of ComputeSecretsInner class. */ + public ComputeSecretsInner() { + } + /** * Validates the instance. * 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 77% 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..71116c0b5ad2 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,31 +8,34 @@ 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; + /** Creates an instance of DataContainerInner class. */ + public DataContainerInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public DataContainerDetails properties() { + public DataContainerProperties properties() { return this.properties; } @@ -40,9 +43,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 +68,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 76% 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..449696898726 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,31 +8,34 @@ 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; + /** Creates an instance of DataVersionBaseInner class. */ + public DataVersionBaseInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public DataVersionBaseDetails properties() { + public DataVersionBaseProperties properties() { return this.properties; } @@ -40,9 +43,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 +68,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 80% 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..d462f55031fd 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,31 +8,34 @@ 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; + /** Creates an instance of DatastoreInner class. */ + public DatastoreInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public DatastoreDetails properties() { + public DatastoreProperties properties() { return this.properties; } @@ -40,9 +43,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 +68,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/DatastoreSecretsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java index 936757cf5fe2..c71d340ef707 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java @@ -32,6 +32,10 @@ }) @Immutable public class DatastoreSecretsInner { + /** Creates an instance of DatastoreSecretsInner class. */ + public DatastoreSecretsInner() { + } + /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java index f1b036e62efa..d9e251314114 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java @@ -16,6 +16,10 @@ public final class DeploymentLogsInner { @JsonProperty(value = "content") private String content; + /** Creates an instance of DeploymentLogsInner class. */ + public DeploymentLogsInner() { + } + /** * Get the content property: The retrieved online deployment logs. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java index 9df052e9356e..0294a92441bb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java @@ -17,6 +17,10 @@ public final class DiagnoseResponseResultInner { @JsonProperty(value = "value") private DiagnoseResponseResultValue value; + /** Creates an instance of DiagnoseResponseResultInner class. */ + public DiagnoseResponseResultInner() { + } + /** * Get the value property: The value property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java index 6e69c444913f..cd26c1312628 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java @@ -22,6 +22,10 @@ public final class EndpointAuthKeysInner { @JsonProperty(value = "secondaryKey") private String secondaryKey; + /** Creates an instance of EndpointAuthKeysInner class. */ + public EndpointAuthKeysInner() { + } + /** * Get the primaryKey property: The primary key. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java index d3be23560e2c..f0a288636a6c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java @@ -34,6 +34,10 @@ public final class EndpointAuthTokenInner { @JsonProperty(value = "tokenType") private String tokenType; + /** Creates an instance of EndpointAuthTokenInner class. */ + public EndpointAuthTokenInner() { + } + /** * Get the accessToken property: Access token for endpoint authentication. * 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..6219e1e61a6c 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) @@ -56,6 +53,10 @@ public class EndpointPropertiesBaseInner { @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) private String swaggerUri; + /** Creates an instance of EndpointPropertiesBaseInner class. */ + public EndpointPropertiesBaseInner() { + } + /** * Get the authMode property: [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine * Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. 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/EnvironmentContainerInner.java similarity index 78% 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/EnvironmentContainerInner.java index 70dba5130698..a6d47c5fe1aa 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/EnvironmentContainerInner.java @@ -8,31 +8,34 @@ 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.EnvironmentContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class EnvironmentVersionDataInner extends ProxyResource { +public final class EnvironmentContainerInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private EnvironmentVersionDetails 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; + /** Creates an instance of EnvironmentContainerInner class. */ + public EnvironmentContainerInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public EnvironmentVersionDetails properties() { + public EnvironmentContainerProperties properties() { return this.properties; } @@ -40,9 +43,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 EnvironmentContainerInner object itself. */ - public EnvironmentVersionDataInner withProperties(EnvironmentVersionDetails properties) { + public EnvironmentContainerInner withProperties(EnvironmentContainerProperties properties) { this.properties = properties; return this; } @@ -66,11 +69,11 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model EnvironmentVersionDataInner")); + "Missing required property properties in model EnvironmentContainerInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVersionDataInner.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/EnvironmentContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java similarity index 79% 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/EnvironmentVersionInner.java index e0b57af590f2..ce8d1971fc7a 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/EnvironmentVersionInner.java @@ -8,31 +8,34 @@ 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.EnvironmentVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Resource Manager resource envelope. */ @Fluent -public final class EnvironmentContainerDataInner extends ProxyResource { +public final class EnvironmentVersionInner extends ProxyResource { /* * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private EnvironmentContainerDetails 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; + /** Creates an instance of EnvironmentVersionInner class. */ + public EnvironmentVersionInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public EnvironmentContainerDetails properties() { + public EnvironmentVersionProperties properties() { return this.properties; } @@ -40,9 +43,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 EnvironmentVersionInner object itself. */ - public EnvironmentContainerDataInner withProperties(EnvironmentContainerDetails properties) { + public EnvironmentVersionInner withProperties(EnvironmentVersionProperties properties) { this.properties = properties; return this; } @@ -66,11 +69,11 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property properties in model EnvironmentContainerDataInner")); + "Missing required property properties in model EnvironmentVersionInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentContainerDataInner.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..ac7a9f1a822b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExportSummaryInner.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.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; + + /** Creates an instance of ExportSummaryInner class. */ + public ExportSummaryInner() { + } + + /** + * 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/ExternalFqdnResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java index 82967b52287d..8dbef74cad4f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java @@ -18,6 +18,10 @@ public final class ExternalFqdnResponseInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of ExternalFqdnResponseInner class. */ + public ExternalFqdnResponseInner() { + } + /** * Get the value property: The value property. * 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 79% 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..031843b71332 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,31 +8,34 @@ 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; + /** Creates an instance of JobBaseInner class. */ + public JobBaseInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public JobBaseDetails properties() { + public JobBaseProperties properties() { return this.properties; } @@ -40,9 +43,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 +68,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..3c5a018d5073 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobInner.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.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; + + /** Creates an instance of LabelingJobInner class. */ + public LabelingJobInner() { + } + + /** + * 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/ListNotebookKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java index b96547c4398c..7750f1375b4c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java @@ -22,6 +22,10 @@ public final class ListNotebookKeysResultInner { @JsonProperty(value = "secondaryAccessKey", access = JsonProperty.Access.WRITE_ONLY) private String secondaryAccessKey; + /** Creates an instance of ListNotebookKeysResultInner class. */ + public ListNotebookKeysResultInner() { + } + /** * Get the primaryAccessKey property: The primaryAccessKey property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java index bbe7061f8f13..f4fd116ddf38 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java @@ -16,6 +16,10 @@ public final class ListStorageAccountKeysResultInner { @JsonProperty(value = "userStorageKey", access = JsonProperty.Access.WRITE_ONLY) private String userStorageKey; + /** Creates an instance of ListStorageAccountKeysResultInner class. */ + public ListStorageAccountKeysResultInner() { + } + /** * Get the userStorageKey property: The userStorageKey property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java index baa903c6b104..7e18cd1ee62e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java @@ -41,6 +41,10 @@ public final class ListWorkspaceKeysResultInner { @JsonProperty(value = "notebookAccessKeys", access = JsonProperty.Access.WRITE_ONLY) private ListNotebookKeysResultInner notebookAccessKeys; + /** Creates an instance of ListWorkspaceKeysResultInner class. */ + public ListWorkspaceKeysResultInner() { + } + /** * Get the userStorageKey property: The userStorageKey property. * 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 76% 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..59b94aaaf36e 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,31 +8,34 @@ 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; + /** Creates an instance of ModelContainerInner class. */ + public ModelContainerInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public ModelContainerDetails properties() { + public ModelContainerProperties properties() { return this.properties; } @@ -40,9 +43,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 +68,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 77% 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..8d5e0c69f79d 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,31 +8,34 @@ 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; + /** Creates an instance of ModelVersionInner class. */ + public ModelVersionInner() { + } + /** * Get the properties property: [Required] Additional attributes of the entity. * * @return the properties value. */ - public ModelVersionDetails properties() { + public ModelVersionProperties properties() { return this.properties; } @@ -40,9 +43,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 +68,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/NotebookAccessTokenResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java index 7b0aa3e45f8e..6fb3125ba240 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java @@ -58,6 +58,10 @@ public final class NotebookAccessTokenResultInner { @JsonProperty(value = "scope", access = JsonProperty.Access.WRITE_ONLY) private String scope; + /** Creates an instance of NotebookAccessTokenResultInner class. */ + public NotebookAccessTokenResultInner() { + } + /** * Get the notebookResourceId property: The notebookResourceId property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java index 0a97035c0665..943388668017 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java @@ -29,6 +29,10 @@ public final class NotebookResourceInfoInner { @JsonProperty(value = "notebookPreparationError") private NotebookPreparationError notebookPreparationError; + /** Creates an instance of NotebookResourceInfoInner class. */ + public NotebookResourceInfoInner() { + } + /** * Get the fqdn property: The fqdn property. * 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 79% 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..d48288f3c447 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,12 +42,15 @@ 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; + /** Creates an instance of OnlineDeploymentInner class. */ + public OnlineDeploymentInner() { + } + /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * @@ -63,9 +64,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 +86,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 +98,7 @@ public OnlineDeploymentDataInner withKind(String kind) { * * @return the properties value. */ - public OnlineDeploymentDetails properties() { + public OnlineDeploymentProperties properties() { return this.properties; } @@ -105,9 +106,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 +126,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 +144,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 +169,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 +178,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..0f940fd5bb9f 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,12 +42,15 @@ 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; + /** Creates an instance of OnlineEndpointInner class. */ + public OnlineEndpointInner() { + } + /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * @@ -63,9 +64,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 +86,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 +98,7 @@ public OnlineEndpointDataInner withKind(String kind) { * * @return the properties value. */ - public OnlineEndpointDetails properties() { + public OnlineEndpointProperties properties() { return this.properties; } @@ -105,9 +106,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 +126,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 +144,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 +168,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 +177,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..ac7de011781b 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,12 +51,15 @@ 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; + /** Creates an instance of PrivateEndpointConnectionInner class. */ + public PrivateEndpointConnectionInner() { + } + /** * Get the innerProperties property: Resource properties. * 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..c09c5305622f 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; @@ -33,6 +32,10 @@ public final class PrivateEndpointConnectionProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateEndpointConnectionProvisioningState provisioningState; + /** Creates an instance of PrivateEndpointConnectionProperties class. */ + public PrivateEndpointConnectionProperties() { + } + /** * Get the privateEndpoint property: The resource of private end point. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java index 2a568206a7dc..6047466b9230 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java @@ -18,6 +18,10 @@ public final class PrivateLinkResourceListResultInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of PrivateLinkResourceListResultInner class. */ + public PrivateLinkResourceListResultInner() { + } + /** * Get the value property: Array of private link resources. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java index 76ae0613005b..7547a19c2fa6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java @@ -29,6 +29,10 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "requiredZoneNames") private List requiredZoneNames; + /** Creates an instance of PrivateLinkResourceProperties class. */ + public PrivateLinkResourceProperties() { + } + /** * Get the groupId property: The private link resource group id. * 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/RegistryInner.java similarity index 69% 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/RegistryInner.java index 2dc693909a68..39ab272f6938 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/RegistryInner.java @@ -6,26 +6,25 @@ 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.BatchEndpointDetails; 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 BatchEndpointData model. */ +/** The Registry model. */ @Fluent -public final class BatchEndpointDataInner extends Resource { +public final class RegistryInner 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 +33,7 @@ public final class BatchEndpointDataInner extends Resource { * [Required] Additional attributes of the entity. */ @JsonProperty(value = "properties", required = true) - private BatchEndpointDetails properties; + private RegistryProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -42,6 +41,16 @@ public final class BatchEndpointDataInner extends Resource { @JsonProperty(value = "sku") private Sku sku; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of RegistryInner class. */ + public RegistryInner() { + } + /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * @@ -55,9 +64,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 RegistryInner object itself. */ - public BatchEndpointDataInner withIdentity(ManagedServiceIdentity identity) { + public RegistryInner withIdentity(ManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -77,9 +86,9 @@ public String kind() { * the same type. * * @param kind the kind value to set. - * @return the BatchEndpointDataInner object itself. + * @return the RegistryInner object itself. */ - public BatchEndpointDataInner withKind(String kind) { + public RegistryInner withKind(String kind) { this.kind = kind; return this; } @@ -89,7 +98,7 @@ public BatchEndpointDataInner withKind(String kind) { * * @return the properties value. */ - public BatchEndpointDetails properties() { + public RegistryProperties properties() { return this.properties; } @@ -97,9 +106,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 RegistryInner object itself. */ - public BatchEndpointDataInner withProperties(BatchEndpointDetails properties) { + public RegistryInner withProperties(RegistryProperties properties) { this.properties = properties; return this; } @@ -117,23 +126,32 @@ 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 RegistryInner object itself. */ - public BatchEndpointDataInner withSku(Sku sku) { + 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 BatchEndpointDataInner withLocation(String location) { + public RegistryInner withLocation(String location) { super.withLocation(location); return this; } /** {@inheritDoc} */ @Override - public BatchEndpointDataInner withTags(Map tags) { + public RegistryInner withTags(Map tags) { super.withTags(tags); return this; } @@ -150,8 +168,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 RegistryInner")); } else { properties().validate(); } @@ -160,5 +177,5 @@ public void validate() { } } - private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointDataInner.class); + 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..66cc69207895 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; @@ -48,6 +50,10 @@ public final class ResourceQuotaInner { @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private QuotaUnit unit; + /** Creates an instance of ResourceQuotaInner class. */ + public ResourceQuotaInner() { + } + /** * Get the id property: Specifies the resource ID. * @@ -85,7 +91,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..4efea46f4816 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.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.ScheduleProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class ScheduleInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private ScheduleProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ScheduleInner class. */ + public ScheduleInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public ScheduleProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the ScheduleInner object itself. + */ + public ScheduleInner withProperties(ScheduleProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ScheduleInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduleInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java index 138ce3737489..958d5005f9a1 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,12 +30,15 @@ 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; + /** Creates an instance of SharedPrivateLinkResourceProperty class. */ + public SharedPrivateLinkResourceProperty() { + } + /** * Get the privateLinkResourceId property: The resource id that private link links to. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java index b2f0005ca011..7eeb0fa29679 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java @@ -30,6 +30,10 @@ public final class SkuResourceInner { @JsonProperty(value = "sku") private SkuSetting sku; + /** Creates an instance of SkuResourceInner class. */ + public SkuResourceInner() { + } + /** * Get the capacity property: Gets or sets the Sku Capacity. * 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..dbbad12998c9 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,13 +19,16 @@ 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; + /** Creates an instance of UpdateWorkspaceQuotasResultInner class. */ + public UpdateWorkspaceQuotasResultInner() { + } + /** * Get the value property: The list of workspace quota update result. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java index e1cee07fbefd..e4fe73205963 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java @@ -54,6 +54,10 @@ public final class UsageInner { @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private UsageName name; + /** Creates an instance of UsageInner class. */ + public UsageInner() { + } + /** * Get the id property: Specifies the resource ID. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java index fc5171f87b6d..1b6d96583c16 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java @@ -18,6 +18,10 @@ public final class VirtualMachineSizeListResultInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of VirtualMachineSizeListResultInner class. */ + public VirtualMachineSizeListResultInner() { + } + /** * Get the value property: The list of virtual machine sizes supported by AmlCompute. * 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..640d838868b7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WorkspaceConnectionPropertiesV2BasicResource model. */ +@Fluent +public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends ProxyResource { + /* + * The properties property. + */ + @JsonProperty(value = "properties", required = true) + private WorkspaceConnectionPropertiesV2 properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceInner class. */ + public WorkspaceConnectionPropertiesV2BasicResourceInner() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public WorkspaceConnectionPropertiesV2 properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the WorkspaceConnectionPropertiesV2BasicResourceInner object itself. + */ + public WorkspaceConnectionPropertiesV2BasicResourceInner withProperties( + WorkspaceConnectionPropertiesV2 properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model" + + " WorkspaceConnectionPropertiesV2BasicResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(WorkspaceConnectionPropertiesV2BasicResourceInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionProps.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionProps.java deleted file mode 100644 index 15f018b7d07c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionProps.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace Connection specific properties. */ -@Fluent -public final class WorkspaceConnectionProps { - /* - * Category of the workspace connection. - */ - @JsonProperty(value = "category") - private String category; - - /* - * Target of the workspace connection. - */ - @JsonProperty(value = "target") - private String target; - - /* - * Authorization type of the workspace connection. - */ - @JsonProperty(value = "authType") - private String authType; - - /* - * Value details of the workspace connection. - */ - @JsonProperty(value = "value") - private String value; - - /* - * format for the workspace connection value - */ - @JsonProperty(value = "valueFormat") - private ValueFormat valueFormat; - - /** - * Get the category property: Category of the workspace connection. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Category of the workspace connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the target property: Target of the workspace connection. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: Target of the workspace connection. - * - * @param target the target value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - public String authType() { - return this.authType; - } - - /** - * Set the authType property: Authorization type of the workspace connection. - * - * @param authType the authType value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withAuthType(String authType) { - this.authType = authType; - return this; - } - - /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - public ValueFormat valueFormat() { - return this.valueFormat; - } - - /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java index dccf0f29f1b6..e0b63a99aa7a 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,12 +54,15 @@ 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; + /** Creates an instance of WorkspaceInner class. */ + public WorkspaceInner() { + } + /** * Get the innerProperties property: The properties of the machine learning workspace. * @@ -340,7 +343,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 +604,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..cc50db7ec1b6 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,39 @@ 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; + + /** Creates an instance of WorkspacePropertiesInner class. */ + public WorkspacePropertiesInner() { + } + /** * Get the workspaceId property: The immutable id associated with this workspace. * @@ -330,7 +347,7 @@ public WorkspacePropertiesInner withDiscoveryUrl(String discoveryUrl) { * * @return the provisioningState value. */ - public ProvisioningState provisioningState() { + public WorkspaceProvisioningState provisioningState() { return this.provisioningState; } @@ -568,6 +585,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..058fc99d5d8b 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,16 @@ public final class WorkspacePropertiesUpdateParameters { @JsonProperty(value = "containerRegistry") private String containerRegistry; + /* + * The encryption settings of the workspace. + */ + @JsonProperty(value = "encryption") + private EncryptionUpdateProperties encryption; + + /** Creates an instance of WorkspacePropertiesUpdateParameters class. */ + public WorkspacePropertiesUpdateParameters() { + } + /** * Get the description property: The description of this workspace. * @@ -224,6 +234,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 +263,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..3c9c12870e83 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())); @@ -848,15 +848,16 @@ private Mono getAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. * @param deploymentName The identifier for the Batch deployments. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. + * @return a batch inference deployment by id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentDataInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return getAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); } /** @@ -866,16 +867,15 @@ public BatchDeploymentDataInner get( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. + * @return a batch inference deployment by id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); + public BatchDeploymentInner get( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); } /** @@ -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..c1294dbb5c11 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,9 @@ public void delete( this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); } - public BatchDeploymentData get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - BatchDeploymentDataInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); - if (inner != null) { - return new BatchDeploymentDataImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( + 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 +67,24 @@ 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 BatchDeployment get( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + BatchDeploymentInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); + if (inner != null) { + return new BatchDeploymentImpl(inner, this.manager()); } else { return null; } } - public 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..43e01217aeca 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 @@ -6,23 +6,21 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.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 +57,7 @@ public String kind() { return this.innerModel().kind(); } - public BatchEndpointDetails properties() { + public BatchEndpointProperties properties() { return this.innerModel().properties(); } @@ -67,6 +65,10 @@ public Sku sku() { return this.innerModel().sku(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -79,7 +81,7 @@ public String resourceGroupName() { return resourceGroupName; } - public BatchEndpointDataInner innerModel() { + public BatchEndpointInner innerModel() { return this.innerObject; } @@ -93,15 +95,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 +112,7 @@ public BatchEndpointData create() { return this; } - public BatchEndpointData create(Context context) { + public BatchEndpoint create(Context context) { this.innerObject = serviceManager .serviceClient() @@ -119,19 +121,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 +141,7 @@ public BatchEndpointData apply() { return this; } - public BatchEndpointData apply(Context context) { + public BatchEndpoint apply(Context context) { this.innerObject = serviceManager .serviceClient() @@ -149,8 +150,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 +160,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 +170,7 @@ public BatchEndpointData refresh() { return this; } - public BatchEndpointData refresh(Context context) { + public BatchEndpoint refresh(Context context) { this.innerObject = serviceManager .serviceClient() @@ -179,32 +180,32 @@ public BatchEndpointData refresh(Context context) { return this; } - public EndpointAuthKeys listKeys() { - return serviceManager.batchEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); - } - public Response listKeysWithResponse(Context context) { return serviceManager .batchEndpoints() .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); } - public BatchEndpointDataImpl withRegion(Region location) { + public EndpointAuthKeys listKeys() { + return serviceManager.batchEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); + } + + 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 +215,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..93601d321d89 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())); } @@ -776,14 +776,16 @@ private Mono getAsync(String resourceGroupName, String w * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. + * @return a batch inference endpoint by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getAsync(resourceGroupName, workspaceName, endpointName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** @@ -792,16 +794,14 @@ public BatchEndpointDataInner get(String resourceGroupName, String workspaceName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. + * @return a batch inference endpoint by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + public BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } /** @@ -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(); } @@ -1565,14 +1537,16 @@ private Mono listKeysAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { - return listKeysAsync(resourceGroupName, workspaceName, endpointName).block(); + public Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** @@ -1581,22 +1555,21 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. + * @return keys for endpoint authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { + return listKeysWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The 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..111c2006d197 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,34 +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); - if (inner != null) { - return new BatchEndpointDataImpl(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; } } - public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthKeysInner inner = this.serviceClient().listKeys(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 EndpointAuthKeysImpl(inner, this.manager()); + return new BatchEndpointImpl(inner, this.manager()); } else { return null; } @@ -98,7 +89,16 @@ public Response listKeysWithResponse( } } - public BatchEndpointData getById(String id) { + public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { + EndpointAuthKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public BatchEndpoint getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -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..27836edf0a6d 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)); } @@ -468,13 +468,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -483,16 +486,13 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name) { + deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } /** @@ -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())); } @@ -622,14 +622,16 @@ private Mono getAsync(String resourceGroupName, String w * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -638,16 +640,14 @@ public CodeContainerDataInner get(String resourceGroupName, String workspaceName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public CodeContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** @@ -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())); } @@ -796,15 +796,16 @@ private Mono createOrUpdateAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } /** @@ -814,22 +815,22 @@ public CodeContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + public CodeContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The 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..c82929e2dc86 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,20 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -49,132 +45,57 @@ 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); - if (inner != null) { - return new CodeContainerDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); } - 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))); + public CodeContainer get(String resourceGroupName, String workspaceName, String name) { + CodeContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new CodeContainerImpl(inner, this.manager()); + } else { + return null; } - 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 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; } - 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 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; } - 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..1835f6b179a2 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, @@ -540,13 +540,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -556,16 +559,13 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } /** @@ -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())); @@ -708,14 +708,16 @@ private Mono getAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -725,16 +727,14 @@ public CodeVersionDataInner get(String resourceGroupName, String workspaceName, * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** @@ -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())); } @@ -900,15 +900,21 @@ private Mono createOrUpdateAsync( * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + CodeVersionInner body, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } /** @@ -919,27 +925,23 @@ public CodeVersionDataInner createOrUpdate( * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Version entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + public CodeVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The 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 +949,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 +962,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 +977,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 +987,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..3118de08dfda 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,13 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); + return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -55,160 +51,65 @@ 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); - if (inner != null) { - return new CodeVersionDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - 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))); + public CodeVersion get(String resourceGroupName, String workspaceName, String name, String version) { + CodeVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new CodeVersionImpl(inner, this.manager()); + } else { + return null; } - 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 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; } - 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 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; } - 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..488bfd6a9096 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)); } @@ -480,13 +480,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -495,16 +498,13 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name) { + deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } /** @@ -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())); } @@ -634,14 +634,16 @@ private Mono getAsync(String resourceGroupName, Str * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -650,16 +652,14 @@ public ComponentContainerDataInner get(String resourceGroupName, String workspac * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public ComponentContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** @@ -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())); } @@ -812,15 +808,16 @@ private Mono createOrUpdateAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } /** @@ -830,26 +827,22 @@ public ComponentContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - ComponentContainerDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + public ComponentContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The 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..308ac7fc8c0b 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,20 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -50,132 +46,58 @@ 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); - if (inner != null) { - return new ComponentContainerDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); } - 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))); + public ComponentContainer get(String resourceGroupName, String workspaceName, String name) { + ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ComponentContainerImpl(inner, this.manager()); + } else { + return null; } - 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 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; } - 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 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; } - 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..a9acadbdacf4 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, @@ -569,13 +568,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -585,16 +587,13 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } /** @@ -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())); @@ -737,14 +736,16 @@ private Mono getAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -754,16 +755,14 @@ public ComponentVersionDataInner get(String resourceGroupName, String workspaceN * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** @@ -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())); } @@ -929,15 +928,21 @@ private Mono createOrUpdateAsync( * @param name Container name. * @param version Version identifier. * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ComponentVersionInner body, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } /** @@ -948,27 +953,23 @@ public ComponentVersionDataInner createOrUpdate( * @param name Container name. * @param version Version identifier. * @param body Version entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ComponentVersionDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + public ComponentVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The 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 +977,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 +990,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 +1005,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 +1015,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..ee670a394932 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,15 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); + return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -60,160 +55,65 @@ 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); - if (inner != null) { - return new ComponentVersionDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - 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))); + public ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version) { + ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new ComponentVersionImpl(inner, this.manager()); + } else { + return null; } - 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 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; } - 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 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; } - 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..c1080c7b732c 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 Response updateCustomServicesWithResponse(List customServices, Context context) { + return serviceManager + .computes() + .updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, context); + } + + public void updateCustomServices(List customServices) { + serviceManager.computes().updateCustomServices(resourceGroupName, workspaceName, computeName, customServices); + } + public PagedIterable listNodes() { return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName); } @@ -186,14 +199,14 @@ public PagedIterable listNodes(Context context) { return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName, context); } - public ComputeSecrets listKeys() { - return serviceManager.computes().listKeys(resourceGroupName, workspaceName, computeName); - } - public Response listKeysWithResponse(Context context) { return serviceManager.computes().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); } + public ComputeSecrets listKeys() { + return serviceManager.computes().listKeys(resourceGroupName, workspaceName, computeName); + } + public void start() { serviceManager.computes().start(resourceGroupName, workspaceName, computeName); } @@ -218,6 +231,16 @@ public void restart(Context context) { serviceManager.computes().restart(resourceGroupName, workspaceName, computeName, context); } + public Response updateIdleShutdownSettingWithResponse(IdleShutdownSetting parameters, Context context) { + return serviceManager + .computes() + .updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + } + + public void updateIdleShutdownSetting(IdleShutdownSetting parameters) { + serviceManager.computes().updateIdleShutdownSetting(resourceGroupName, workspaceName, computeName, parameters); + } + 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..815ff904cce1 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}) @@ -593,14 +631,16 @@ private Mono getAsync(String resourceGroupName, String wor * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. + * @return compute definition by its name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName) { - return getAsync(resourceGroupName, workspaceName, computeName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String computeName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); } /** @@ -610,16 +650,14 @@ public ComputeResourceInner get(String resourceGroupName, String workspaceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response}. + * @return compute definition by its name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); + public ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName) { + return getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); } /** @@ -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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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(); + } + + /** + * 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) { + updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, Context.NONE); + } + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -1919,14 +2140,17 @@ private Mono listKeysAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName) { - return listKeysAsync(resourceGroupName, workspaceName, computeName).block(); + public Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String computeName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); } /** @@ -1935,17 +2159,14 @@ public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceNa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); + public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName) { + return listKeysWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); } /** @@ -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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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(); + } + + /** + * 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) { + updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, Context.NONE); + } + /** * 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..506de9fb011f 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); @@ -43,15 +46,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); } - public ComputeResource get(String resourceGroupName, String workspaceName, String computeName) { - ComputeResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, computeName); - if (inner != null) { - return new ComputeResourceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String computeName, Context context) { Response inner = @@ -67,6 +61,15 @@ public Response getWithResponse( } } + public ComputeResource get(String resourceGroupName, String workspaceName, String computeName) { + ComputeResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, computeName); + if (inner != null) { + return new ComputeResourceImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete( String resourceGroupName, String workspaceName, @@ -84,6 +87,22 @@ public void delete( this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); } + public Response updateCustomServicesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + List customServices, + Context context) { + return this + .serviceClient() + .updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, context); + } + + public void updateCustomServices( + String resourceGroupName, String workspaceName, String computeName, List customServices) { + this.serviceClient().updateCustomServices(resourceGroupName, workspaceName, computeName, customServices); + } + public PagedIterable listNodes( String resourceGroupName, String workspaceName, String computeName) { return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName); @@ -94,15 +113,6 @@ public PagedIterable listNodes( return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName, context); } - public ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName) { - ComputeSecretsInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, computeName); - if (inner != null) { - return new ComputeSecretsImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listKeysWithResponse( String resourceGroupName, String workspaceName, String computeName, Context context) { Response inner = @@ -118,6 +128,15 @@ public Response listKeysWithResponse( } } + public ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName) { + ComputeSecretsInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, computeName); + if (inner != null) { + return new ComputeSecretsImpl(inner, this.manager()); + } else { + return null; + } + } + public void start(String resourceGroupName, String workspaceName, String computeName) { this.serviceClient().start(resourceGroupName, workspaceName, computeName); } @@ -142,6 +161,22 @@ public void restart(String resourceGroupName, String workspaceName, String compu this.serviceClient().restart(resourceGroupName, workspaceName, computeName, context); } + public Response updateIdleShutdownSettingWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + IdleShutdownSetting parameters, + Context context) { + return this + .serviceClient() + .updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + } + + public void updateIdleShutdownSetting( + String resourceGroupName, String workspaceName, String computeName, IdleShutdownSetting parameters) { + this.serviceClient().updateIdleShutdownSetting(resourceGroupName, workspaceName, computeName, parameters); + } + 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..26e8ab052ae2 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)); } @@ -480,13 +480,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -495,16 +498,13 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name) { + deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } /** @@ -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())); } @@ -634,14 +634,16 @@ private Mono getAsync(String resourceGroupName, String w * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -650,16 +652,14 @@ public DataContainerDataInner get(String resourceGroupName, String workspaceName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public DataContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** @@ -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())); } @@ -808,15 +808,16 @@ private Mono createOrUpdateAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } /** @@ -826,22 +827,22 @@ public DataContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + public DataContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, DataContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The 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..2bc8ef7ece53 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,20 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -50,31 +46,35 @@ 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); - if (inner != null) { - return new DataContainerDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); } - 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 DataContainer get(String resourceGroupName, String workspaceName, String name) { + DataContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new DataContainerImpl(inner, this.manager()); } else { return null; } } - public 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..3c52fd3d3949 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, @@ -595,13 +595,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -611,16 +614,13 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } /** @@ -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())); @@ -763,14 +763,16 @@ private Mono getAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseDataInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -780,16 +782,14 @@ public DataVersionBaseDataInner get(String resourceGroupName, String workspaceNa * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** @@ -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())); } @@ -955,15 +955,21 @@ private Mono createOrUpdateAsync( * @param name Container name. * @param version Version identifier. * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + DataVersionBaseInner body, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } /** @@ -974,27 +980,23 @@ public DataVersionBaseDataInner createOrUpdate( * @param name Container name. * @param version Version identifier. * @param body Version entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - DataVersionBaseDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + public DataVersionBaseInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The 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 +1004,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 +1017,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 +1032,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 +1042,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..09fc917310d6 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,15 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); + return Utils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -61,31 +56,35 @@ 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); - if (inner != null) { - return new DataVersionBaseDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - 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 DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version) { + DataVersionBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new DataVersionBaseImpl(inner, this.manager()); } else { return null; } } - public 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..e1686a772212 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() @@ -151,20 +150,20 @@ public DatastoreData refresh(Context context) { return this; } - public DatastoreSecrets listSecrets() { - return serviceManager.datastores().listSecrets(resourceGroupName, workspaceName, name); - } - public Response listSecretsWithResponse(Context context) { return serviceManager.datastores().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); } - public DatastoreDataImpl withProperties(DatastoreDetails properties) { + public DatastoreSecrets listSecrets() { + return serviceManager.datastores().listSecrets(resourceGroupName, workspaceName, name); + } + + 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..2f596735fd6b 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, @@ -626,13 +630,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -641,16 +648,13 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name) { + deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } /** @@ -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())); } @@ -780,14 +784,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore. + * @return datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -796,16 +802,14 @@ public DatastoreDataInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. + * @return datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public DatastoreInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** @@ -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) { @@ -944,15 +948,15 @@ private Mono> createOrUpdateWithResponseAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body, Boolean skipValidation) { + 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())); } @@ -964,17 +968,23 @@ private Mono createOrUpdateAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. * @param body Datastore entity to create or update. + * @param skipValidation Flag to skip validation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body) { - final Boolean skipValidation = null; - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + DatastoreInner body, + Boolean skipValidation, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation, context) + .block(); } /** @@ -990,36 +1000,11 @@ 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(); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - DatastoreDataInner body, - Boolean skipValidation, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation, context) - .block(); + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, skipValidation, Context.NONE) + .getValue(); } /** @@ -1149,14 +1134,16 @@ private Mono listSecretsAsync(String resourceGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets. + * @return datastore secrets along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name) { - return listSecretsAsync(resourceGroupName, workspaceName, name).block(); + public Response listSecretsWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -1165,22 +1152,21 @@ public DatastoreSecretsInner listSecrets(String resourceGroupName, String worksp * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response}. + * @return datastore secrets. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name) { + return listSecretsWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The 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 +1174,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 +1187,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 +1202,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 +1212,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..bc059720b005 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,11 +60,7 @@ public PagedIterable list( orderBy, orderByAsc, context); - return Utils.mapPage(inner, inner1 -> new DatastoreDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -72,34 +68,29 @@ 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); - if (inner != null) { - return new DatastoreDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); } - 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; } } - public DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name) { - DatastoreSecretsInner inner = this.serviceClient().listSecrets(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 DatastoreSecretsImpl(inner, this.manager()); + return new DatastoreImpl(inner, this.manager()); } else { return null; } @@ -120,7 +111,16 @@ public Response listSecretsWithResponse( } } - public DatastoreData getById(String id) { + public DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name) { + DatastoreSecretsInner inner = this.serviceClient().listSecrets(resourceGroupName, workspaceName, name); + if (inner != null) { + return new DatastoreSecretsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Datastore getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -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..6e1de063f34e 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)); } @@ -481,13 +481,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -496,16 +499,13 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name) { + deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } /** @@ -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())); } @@ -635,14 +635,16 @@ private Mono getAsync(String resourceGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -651,16 +653,14 @@ public EnvironmentContainerDataInner get(String resourceGroupName, String worksp * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** @@ -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())); } @@ -813,15 +809,16 @@ private Mono createOrUpdateAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } /** @@ -831,26 +828,22 @@ public EnvironmentContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - EnvironmentContainerDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + public EnvironmentContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The 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..b41fa86b685e 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,21 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -51,132 +46,58 @@ 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); - if (inner != null) { - return new EnvironmentContainerDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); } - 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))); + public EnvironmentContainer get(String resourceGroupName, String workspaceName, String name) { + EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new EnvironmentContainerImpl(inner, this.manager()); + } else { + return null; } - 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 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; } - 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 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; } - 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..f2e1aa5b8bcc 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, @@ -573,13 +571,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -589,16 +590,13 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } /** @@ -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())); @@ -741,15 +739,16 @@ private Mono getAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionDataInner get( - String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -759,16 +758,14 @@ public EnvironmentVersionDataInner get( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** @@ -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())); } @@ -934,15 +931,21 @@ private Mono createOrUpdateAsync( * @param name Name of EnvironmentVersion. This is case-sensitive. * @param version Version of EnvironmentVersion. * @param body Definition of EnvironmentVersion. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + EnvironmentVersionInner body, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } /** @@ -953,27 +956,23 @@ public EnvironmentVersionDataInner createOrUpdate( * @param name Name of EnvironmentVersion. This is case-sensitive. * @param version Version of EnvironmentVersion. * @param body Definition of EnvironmentVersion. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - EnvironmentVersionDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + public EnvironmentVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The 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 +980,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 +993,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 +1008,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 +1018,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..99fe30b16861 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,15 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); + return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -60,160 +56,65 @@ 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); - if (inner != null) { - return new EnvironmentVersionDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - 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))); + public EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version) { + EnvironmentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new EnvironmentVersionImpl(inner, this.manager()); + } else { + return null; } - 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 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; } - 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 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; } - 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..c46c1d49b730 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())); } @@ -839,14 +839,16 @@ private Mono getAsync(String resourceGroupName, String workspa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id. + * @return a Job by name/id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseDataInner get(String resourceGroupName, String workspaceName, String id) { - return getAsync(resourceGroupName, workspaceName, id).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String id, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); } /** @@ -855,16 +857,14 @@ public JobBaseDataInner get(String resourceGroupName, String workspaceName, Stri * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. + * @return a Job by name/id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); + public JobBaseInner get(String resourceGroupName, String workspaceName, String id) { + return getWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); } /** @@ -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())); } @@ -1013,15 +1013,16 @@ private Mono createOrUpdateAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. * @param body Job definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, id, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); } /** @@ -1031,20 +1032,18 @@ public JobBaseDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. * @param body Job definition object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); + public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, id, body, Context.NONE).getValue(); } /** - * 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 (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. + * 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..ae2eaaa3d606 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); - if (inner != null) { - return new JobBaseDataImpl(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; + } + } + + public JobBase get(String resourceGroupName, String workspaceName, String id) { + JobBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); + if (inner != null) { + return new JobBaseImpl(inner, this.manager()); } else { return null; } @@ -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..1adbf90a8084 --- /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 Response pauseWithResponse(Context context) { + return serviceManager.labelingJobs().pauseWithResponse(resourceGroupName, workspaceName, id, context); + } + + public void pause() { + serviceManager.labelingJobs().pause(resourceGroupName, workspaceName, id); + } + + 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..ef70633a0e99 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsClientImpl.java @@ -0,0 +1,1802 @@ +// Copyright (c) Microsoft Corporation. All rights 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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(); + } + + /** + * 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) { + deleteWithResponse(resourceGroupName, workspaceName, id, Context.NONE); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @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(); + } + + /** + * 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 getWithResponse( + resourceGroupName, workspaceName, id, includeJobInstructions, includeLabelCategories, Context.NONE) + .getValue(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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(); + } + + /** + * 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) { + pauseWithResponse(resourceGroupName, workspaceName, id, Context.NONE); + } + + /** + * 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..2e2f3eea1982 --- /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 Response deleteWithResponse( + String resourceGroupName, String workspaceName, String id, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, id, context); + } + + public void delete(String resourceGroupName, String workspaceName, String id) { + this.serviceClient().delete(resourceGroupName, workspaceName, id); + } + + 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 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 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 Response pauseWithResponse( + String resourceGroupName, String workspaceName, String id, Context context) { + return this.serviceClient().pauseWithResponse(resourceGroupName, workspaceName, id, context); + } + + public void pause(String resourceGroupName, String workspaceName, String id) { + this.serviceClient().pause(resourceGroupName, workspaceName, id); + } + + 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..c6ea2bc7e56b 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, @@ -505,13 +505,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -520,16 +523,13 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name) { + deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } /** @@ -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())); } @@ -659,14 +659,16 @@ private Mono getAsync(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -675,16 +677,14 @@ public ModelContainerDataInner get(String resourceGroupName, String workspaceNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public ModelContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** @@ -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())); } @@ -833,15 +833,16 @@ private Mono createOrUpdateAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } /** @@ -851,22 +852,22 @@ public ModelContainerDataInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param body Container entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + public ModelContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The 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..9f8487328cd0 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,25 +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())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -55,132 +51,57 @@ 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); - if (inner != null) { - return new ModelContainerDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); } - 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))); + public ModelContainer get(String resourceGroupName, String workspaceName, String name) { + ModelContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ModelContainerImpl(inner, this.manager()); + } else { + return null; } - 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 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; } - 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 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; } - 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..521a0da39876 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, @@ -728,13 +728,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -744,16 +747,13 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } /** @@ -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())); @@ -896,14 +896,16 @@ private Mono getAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); } /** @@ -913,16 +915,14 @@ public ModelVersionDataInner get(String resourceGroupName, String workspaceName, * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** @@ -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())); } @@ -1088,15 +1088,21 @@ private Mono createOrUpdateAsync( * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ModelVersionInner body, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } /** @@ -1107,27 +1113,23 @@ public ModelVersionDataInner createOrUpdate( * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Version entity to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + public ModelVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The 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 +1137,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 +1150,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 +1165,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 +1175,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..b24ff29b2072 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,11 +67,7 @@ public PagedIterable list( feed, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ModelVersionDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); + return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); } public Response deleteWithResponse( @@ -79,160 +75,65 @@ 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); - if (inner != null) { - return new ModelVersionDataImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - 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))); + public ModelVersion get(String resourceGroupName, String workspaceName, String name, String version) { + ModelVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new ModelVersionImpl(inner, this.manager()); + } else { + return null; } - 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 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; } - 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 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; } - 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..d6f213d3eda4 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() @@ -192,34 +189,34 @@ public OnlineDeploymentData refresh(Context context) { return this; } - public DeploymentLogs getLogs(DeploymentLogsRequest body) { + public Response getLogsWithResponse(DeploymentLogsRequest body, Context context) { return serviceManager .onlineDeployments() - .getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); + .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); } - public Response getLogsWithResponse(DeploymentLogsRequest body, Context context) { + public DeploymentLogs getLogs(DeploymentLogsRequest body) { return serviceManager .onlineDeployments() - .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + .getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); } - 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..4f4f5905e6d0 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())); @@ -902,15 +902,16 @@ private Mono getAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment. + * @return inference Deployment Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentDataInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return getAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); } /** @@ -920,16 +921,15 @@ public OnlineDeploymentDataInner get( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. + * @return inference Deployment Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); + public OnlineDeploymentInner get( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); } /** @@ -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(); @@ -1810,19 +1802,22 @@ private Mono getLogsAsync( * @param endpointName Inference endpoint name. * @param deploymentName The name and identifier for the endpoint. * @param body The request containing parameters for retrieving logs. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentLogsInner getLogs( + public Response getLogsWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - DeploymentLogsRequest body) { - return getLogsAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); + DeploymentLogsRequest body, + Context context) { + return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + .block(); } /** @@ -1833,22 +1828,20 @@ public DeploymentLogsInner getLogs( * @param endpointName Inference endpoint name. * @param deploymentName The name and identifier for the endpoint. * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLogsWithResponse( + public DeploymentLogsInner getLogs( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - DeploymentLogsRequest body, - Context context) { - return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); + DeploymentLogsRequest body) { + return getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, Context.NONE) + .getValue(); } /** @@ -2136,7 +2129,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 +2138,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 +2151,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 +2166,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 +2176,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 +2204,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 +2241,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..4c98b529a0d7 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,9 @@ public void delete( this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); } - public OnlineDeploymentData get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - OnlineDeploymentDataInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); - if (inner != null) { - return new OnlineDeploymentDataImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( + 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,22 +72,18 @@ public Response getWithResponse( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OnlineDeploymentDataImpl(inner.getValue(), this.manager())); + new OnlineDeploymentImpl(inner.getValue(), this.manager())); } else { return null; } } - public DeploymentLogs getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { - DeploymentLogsInner inner = - this.serviceClient().getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); + public OnlineDeployment get( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + OnlineDeploymentInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); if (inner != null) { - return new DeploymentLogsImpl(inner, this.manager()); + return new OnlineDeploymentImpl(inner, this.manager()); } else { return null; } @@ -127,6 +111,21 @@ public Response getLogsWithResponse( } } + public DeploymentLogs getLogs( + String resourceGroupName, + String workspaceName, + String endpointName, + String deploymentName, + DeploymentLogsRequest body) { + DeploymentLogsInner inner = + this.serviceClient().getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); + if (inner != null) { + return new DeploymentLogsImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listSkus( String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { PagedIterable inner = @@ -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..f45e6848ce3a 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() @@ -186,16 +182,16 @@ public OnlineEndpointData refresh(Context context) { return this; } - public EndpointAuthKeys listKeys() { - return serviceManager.onlineEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); - } - public Response listKeysWithResponse(Context context) { return serviceManager .onlineEndpoints() .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); } + public EndpointAuthKeys listKeys() { + return serviceManager.onlineEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); + } + public void regenerateKeys(RegenerateEndpointKeysRequest body) { serviceManager.onlineEndpoints().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); } @@ -204,32 +200,32 @@ public void regenerateKeys(RegenerateEndpointKeysRequest body, Context context) serviceManager.onlineEndpoints().regenerateKeys(resourceGroupName, workspaceName, endpointName, body, context); } - public EndpointAuthToken getToken() { - return serviceManager.onlineEndpoints().getToken(resourceGroupName, workspaceName, endpointName); - } - public Response getTokenWithResponse(Context context) { return serviceManager .onlineEndpoints() .getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); } - public OnlineEndpointDataImpl withRegion(Region location) { + public EndpointAuthToken getToken() { + return serviceManager.onlineEndpoints().getToken(resourceGroupName, workspaceName, endpointName); + } + + 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..68ef9d933794 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())); } @@ -936,14 +935,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint. + * @return online Endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getAsync(resourceGroupName, workspaceName, endpointName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** @@ -952,16 +953,14 @@ public OnlineEndpointDataInner get(String resourceGroupName, String workspaceNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. + * @return online Endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + public OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } /** @@ -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(); } @@ -1725,14 +1716,16 @@ private Mono listKeysAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { - return listKeysAsync(resourceGroupName, workspaceName, endpointName).block(); + public Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** @@ -1741,16 +1734,14 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. + * @return keys for endpoint authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { + return listKeysWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } /** @@ -2179,14 +2170,16 @@ private Mono getTokenAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token. + * @return service Token along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthTokenInner getToken(String resourceGroupName, String workspaceName, String endpointName) { - return getTokenAsync(resourceGroupName, workspaceName, endpointName).block(); + public Response getTokenWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context) { + return getTokenWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** @@ -2195,22 +2188,21 @@ public EndpointAuthTokenInner getToken(String resourceGroupName, String workspac * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token along with {@link Response}. + * @return service Token. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return getTokenWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + public EndpointAuthTokenInner getToken(String resourceGroupName, String workspaceName, String endpointName) { + return getTokenWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The 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..6bf5914ab736 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,34 +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); - if (inner != null) { - return new OnlineEndpointDataImpl(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; } } - public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthKeysInner inner = this.serviceClient().listKeys(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 EndpointAuthKeysImpl(inner, this.manager()); + return new OnlineEndpointImpl(inner, this.manager()); } else { return null; } @@ -124,6 +115,15 @@ public Response listKeysWithResponse( } } + public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { + EndpointAuthKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + public void regenerateKeys( String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); @@ -138,15 +138,6 @@ public void regenerateKeys( this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body, context); } - public EndpointAuthToken getToken(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthTokenInner inner = this.serviceClient().getToken(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new EndpointAuthTokenImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getTokenWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context) { Response inner = @@ -162,7 +153,16 @@ public Response getTokenWithResponse( } } - public OnlineEndpointData getById(String id) { + public EndpointAuthToken getToken(String resourceGroupName, String workspaceName, String endpointName) { + EndpointAuthTokenInner inner = this.serviceClient().getToken(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new EndpointAuthTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + public OnlineEndpoint getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -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..1010c973fd43 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") @@ -438,15 +438,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. + * @return the specified private endpoint connection associated with the workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return getAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); } /** @@ -455,16 +456,16 @@ public PrivateEndpointConnectionInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the specified private endpoint connection associated with the workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); + public PrivateEndpointConnectionInner get( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) + .getValue(); } /** @@ -630,18 +631,22 @@ private Mono createOrUpdateAsync( * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. * @param properties The private endpoint connection properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties) { - return createOrUpdateAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties).block(); + PrivateEndpointConnectionInner properties, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, privateEndpointConnectionName, properties, context) + .block(); } /** @@ -651,22 +656,20 @@ public PrivateEndpointConnectionInner createOrUpdate( * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response}. + * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public PrivateEndpointConnectionInner createOrUpdate( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, properties, context) - .block(); + PrivateEndpointConnectionInner properties) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, privateEndpointConnectionName, properties, Context.NONE) + .getValue(); } /** @@ -803,13 +806,17 @@ private Mono deleteAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - deleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .block(); } /** @@ -818,16 +825,12 @@ public void delete(String resourceGroupName, String workspaceName, String privat * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .block(); + public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java index ee8376e82db2..33910826bfaf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java @@ -41,17 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } - public PrivateEndpointConnection get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { Response inner = @@ -69,8 +58,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); + public PrivateEndpointConnection get( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -80,6 +76,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); } + public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); + } + public PrivateEndpointConnection getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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..2a08e0528f42 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}") @@ -185,14 +185,16 @@ private Mono listAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. + * @return the private link resources that need to be created for a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -200,15 +202,13 @@ public PrivateLinkResourceListResultInner list(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response}. + * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java index 3928c924b0e2..d230fde3cbf9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java @@ -27,15 +27,6 @@ public PrivateLinkResourcesImpl( this.serviceManager = serviceManager; } - public PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName) { - PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response listWithResponse( } } + public PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName) { + PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new PrivateLinkResourceListResultImpl(inner, this.manager()); + } else { + return null; + } + } + private PrivateLinkResourcesClient serviceClient() { return this.innerClient; } 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..81b6318cb161 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") @@ -215,14 +215,16 @@ private Mono updateAsync(String location, Quot * * @param location The location for update quota is queried. * @param parameters Quota update parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. + * @return the result of update workspace quota along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters) { - return updateAsync(location, parameters).block(); + public Response updateWithResponse( + String location, QuotaUpdateParameters parameters, Context context) { + return updateWithResponseAsync(location, parameters, context).block(); } /** @@ -230,16 +232,14 @@ public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParam * * @param location The location for update quota is queried. * @param parameters Quota update parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response}. + * @return the result of update workspace quota. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context) { - return updateWithResponseAsync(location, parameters, context).block(); + public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters) { + return updateWithResponse(location, parameters, Context.NONE).getValue(); } /** @@ -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/QuotasImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java index e17cadcd1b86..14cdcd39648d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java @@ -30,15 +30,6 @@ public QuotasImpl( this.serviceManager = serviceManager; } - public UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters) { - UpdateWorkspaceQuotasResultInner inner = this.serviceClient().update(location, parameters); - if (inner != null) { - return new UpdateWorkspaceQuotasResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response updateWithResponse( String location, QuotaUpdateParameters parameters, Context context) { Response inner = @@ -54,6 +45,15 @@ public Response updateWithResponse( } } + public UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters) { + UpdateWorkspaceQuotasResultInner inner = this.serviceClient().update(location, parameters); + if (inner != null) { + return new UpdateWorkspaceQuotasResultImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list(String location) { PagedIterable inner = this.serviceClient().list(location); return Utils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); 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..9df19bf1abdc --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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(); + } + + /** + * 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) { + deleteWithResponse(resourceGroupName, registryName, Context.NONE); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body, Context context) { + return updateWithResponseAsync(resourceGroupName, registryName, body, context).block(); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner update( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body) { + return updateWithResponse(resourceGroupName, registryName, body, Context.NONE).getValue(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of 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..c6ed28df3587 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights 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 Response deleteByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, registryName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String registryName) { + this.serviceClient().delete(resourceGroupName, registryName); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, registryName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RegistryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Registry getByResourceGroup(String resourceGroupName, String registryName) { + RegistryInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, registryName); + if (inner != null) { + return new RegistryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Registry 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.deleteByResourceGroupWithResponse(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.deleteByResourceGroupWithResponse(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..0343fe8f21b0 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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(); + } + + /** + * 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 getWithResponse(resourceGroupName, registryName, codeName, Context.NONE).getValue(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..091464b41387 --- /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 Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CodeContainer get(String resourceGroupName, String registryName, String codeName) { + CodeContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, codeName); + if (inner != null) { + return new CodeContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public CodeContainer 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..24371b003656 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, codeName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version) { + return getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..2d20c7cb340d --- /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 Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CodeVersion get(String resourceGroupName, String registryName, String codeName, String version) { + CodeVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, codeName, version); + if (inner != null) { + return new CodeVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public CodeVersion 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..8b750e9c48b4 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner get(String resourceGroupName, String registryName, String componentName) { + return getWithResponse(resourceGroupName, registryName, componentName, Context.NONE).getValue(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..120a987a7c4e --- /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 Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ComponentContainer get(String resourceGroupName, String registryName, String componentName) { + ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, componentName); + if (inner != null) { + return new ComponentContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public ComponentContainer 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..553b152e1891 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner get( + String resourceGroupName, String registryName, String componentName, String version) { + return getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..d1f227a93e3f --- /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 Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version) { + ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, componentName, version); + if (inner != null) { + return new ComponentVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public ComponentVersion 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..c91ae6dde828 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName) { + return getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE).getValue(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..5a92713cac22 --- /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 Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName) { + EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, environmentName); + if (inner != null) { + return new EnvironmentContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public EnvironmentContainer 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..04ec5bef7a39 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner get( + String resourceGroupName, String registryName, String environmentName, String version) { + return getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..81d93bafe182 --- /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 Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentVersion get( + String resourceGroupName, String registryName, String environmentName, String version) { + EnvironmentVersionInner inner = + this.serviceClient().get(resourceGroupName, registryName, environmentName, version); + if (inner != null) { + return new EnvironmentVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public EnvironmentVersion 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..663dd4584710 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner get(String resourceGroupName, String registryName, String modelName) { + return getWithResponse(resourceGroupName, registryName, modelName, Context.NONE).getValue(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..5309a813a8a5 --- /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 Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ModelContainer get(String resourceGroupName, String registryName, String modelName) { + ModelContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, modelName); + if (inner != null) { + return new ModelContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public ModelContainer 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..6864f2308356 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version) { + return getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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..68659c2f480e --- /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 Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ModelVersion get(String resourceGroupName, String registryName, String modelName, String version) { + ModelVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, modelName, version); + if (inner != null) { + return new ModelVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public ModelVersion 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..d55ba8e402e6 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schedule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * Get schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schedule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScheduleInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, ScheduleInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, ScheduleInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ScheduleInner.class, + ScheduleInner.class, + this.client.getContext()); + } + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ScheduleInner.class, ScheduleInner.class, context); + } + + /** + * Create or update schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Schedule definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScheduleInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, ScheduleInner body) { + return 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..af20e658dc52 --- /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 Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ScheduleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Schedule get(String resourceGroupName, String workspaceName, String name) { + ScheduleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ScheduleImpl(inner, this.manager()); + } else { + return null; + } + } + + public Schedule getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "schedules"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "schedules"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "schedules"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "schedules"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, context); + } + + private SchedulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ScheduleImpl define(String name) { + return new ScheduleImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/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..aa664408457f 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}") @@ -164,28 +164,28 @@ private Mono listAsync(String location) { * Returns supported VM Sizes in a location. * * @param location The location upon which virtual-machine-sizes is queried. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. + * @return the List Virtual Machine size operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineSizeListResultInner list(String location) { - return listAsync(location).block(); + public Response listWithResponse(String location, Context context) { + return listWithResponseAsync(location, context).block(); } /** * Returns supported VM Sizes in a location. * * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response along with {@link Response}. + * @return the List Virtual Machine size operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String location, Context context) { - return listWithResponseAsync(location, context).block(); + public VirtualMachineSizeListResultInner list(String location) { + return listWithResponse(location, Context.NONE).getValue(); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java index c837e1437ad2..eeec5b0fbd76 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java @@ -27,15 +27,6 @@ public VirtualMachineSizesImpl( this.serviceManager = serviceManager; } - public VirtualMachineSizeListResult list(String location) { - VirtualMachineSizeListResultInner inner = this.serviceClient().list(location); - if (inner != null) { - return new VirtualMachineSizeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse(String location, Context context) { Response inner = this.serviceClient().listWithResponse(location, context); if (inner != null) { @@ -49,6 +40,15 @@ public Response listWithResponse(String location, } } + public VirtualMachineSizeListResult list(String location) { + VirtualMachineSizeListResultInner inner = this.serviceClient().list(location); + if (inner != null) { + return new VirtualMachineSizeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + private VirtualMachineSizesClient serviceClient() { return this.innerClient; } 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..32d6c6697076 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,110 @@ 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)); + 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 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) { - final String target = null; - final String category = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category)); + @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 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 PagedFlux}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, context)); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String target = null; - final String category = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category)); + @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(); } /** - * 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 PagedIterable}. + * @return the 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 WorkspaceConnectionPropertiesV2BasicResourceInner create( + String resourceGroupName, + String workspaceName, + String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { + return createWithResponse(resourceGroupName, workspaceName, connectionName, parameters, Context.NONE) + .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 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 +365,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 +419,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. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionInner create( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters) { - return createAsync(resourceGroupName, workspaceName, connectionName, parameters).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String connectionName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. */ @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 WorkspaceConnectionPropertiesV2BasicResourceInner get( + String resourceGroupName, String workspaceName, String connectionName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); } /** - * 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 +495,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 +527,7 @@ private Mono> getWithResponseAsync( .withContext( context -> service - .get( + .delete( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -566,7 +540,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 +549,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 +579,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 +591,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,63 +599,62 @@ 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. * @param connectionName Friendly name of the workspace connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionInner get(String resourceGroupName, String workspaceName, String connectionName) { - return getAsync(resourceGroupName, workspaceName, connectionName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String connectionName, Context context) { + return deleteWithResponseAsync(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. * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String connectionName) { + deleteWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE); } /** - * 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 +674,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 +736,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..ba28d102dd9c 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,44 +28,30 @@ 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); - if (inner != null) { - return new WorkspaceConnectionImpl(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; } } - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - this.serviceClient().delete(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 WorkspaceConnectionPropertiesV2BasicResourceImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -73,7 +59,27 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); } - public WorkspaceConnection getById(String id) { + public void delete(String resourceGroupName, String workspaceName, String connectionName) { + this.serviceClient().delete(resourceGroupName, workspaceName, connectionName); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils + .mapPage(inner, inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String target, String category, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, target, category, context); + return Utils + .mapPage(inner, inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); + } + + public WorkspaceConnectionPropertiesV2BasicResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -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..a85561f4ac10 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()); } @@ -297,10 +310,6 @@ public Workspace refresh(Context context) { return this; } - public DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters) { - return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, parameters); - } - public DiagnoseResponseResult diagnose() { return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName); } @@ -309,14 +318,14 @@ public DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, C return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, parameters, context); } - public ListWorkspaceKeysResult listKeys() { - return serviceManager.workspaces().listKeys(resourceGroupName, workspaceName); - } - public Response listKeysWithResponse(Context context) { return serviceManager.workspaces().listKeysWithResponse(resourceGroupName, workspaceName, context); } + public ListWorkspaceKeysResult listKeys() { + return serviceManager.workspaces().listKeys(resourceGroupName, workspaceName); + } + public void resyncKeys() { serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); } @@ -325,16 +334,16 @@ public void resyncKeys(Context context) { serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); } - public NotebookAccessTokenResult listNotebookAccessToken() { - return serviceManager.workspaces().listNotebookAccessToken(resourceGroupName, workspaceName); - } - public Response listNotebookAccessTokenWithResponse(Context context) { return serviceManager .workspaces() .listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); } + public NotebookAccessTokenResult listNotebookAccessToken() { + return serviceManager.workspaces().listNotebookAccessToken(resourceGroupName, workspaceName); + } + public NotebookResourceInfo prepareNotebook() { return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); } @@ -343,24 +352,24 @@ public NotebookResourceInfo prepareNotebook(Context context) { return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); } - public ListStorageAccountKeysResult listStorageAccountKeys() { - return serviceManager.workspaces().listStorageAccountKeys(resourceGroupName, workspaceName); - } - public Response listStorageAccountKeysWithResponse(Context context) { return serviceManager .workspaces() .listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); } - public ListNotebookKeysResult listNotebookKeys() { - return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); + public ListStorageAccountKeysResult listStorageAccountKeys() { + return serviceManager.workspaces().listStorageAccountKeys(resourceGroupName, workspaceName); } public Response listNotebookKeysWithResponse(Context context) { return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); } + public ListNotebookKeysResult listNotebookKeys() { + return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); + } + public WorkspaceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -517,6 +526,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..395a7c9d1db7 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}") @@ -423,14 +423,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. + * @return the properties of the specified machine learning workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupAsync(resourceGroupName, workspaceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -438,16 +440,14 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. + * @return the properties of the specified machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -1534,6 +1534,31 @@ private PollerFlux, DiagnoseResponseResu this.client.getContext()); } + /** + * Diagnose workspace setup issue. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DiagnoseResponseResultInner> beginDiagnoseAsync( + String resourceGroupName, String workspaceName) { + final DiagnoseWorkspaceParameters parameters = null; + Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DiagnoseResponseResultInner.class, + DiagnoseResponseResultInner.class, + this.client.getContext()); + } + /** * Diagnose workspace setup issue. * @@ -1567,7 +1592,6 @@ private PollerFlux, DiagnoseResponseResu * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1575,7 +1599,8 @@ private PollerFlux, DiagnoseResponseResu */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { + String resourceGroupName, String workspaceName) { + final DiagnoseWorkspaceParameters parameters = null; return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); } @@ -1654,23 +1679,6 @@ private Mono diagnoseAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnoseResponseResultInner diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - return diagnoseAsync(resourceGroupName, workspaceName, parameters).block(); - } - /** * Diagnose workspace setup issue. * @@ -1824,14 +1832,16 @@ private Mono listKeysAsync(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName) { - return listKeysAsync(resourceGroupName, workspaceName).block(); + public Response listKeysWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -1840,16 +1850,14 @@ public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String wo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName) { + return listKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -2378,14 +2386,16 @@ private Mono listNotebookAccessTokenAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenAsync(resourceGroupName, workspaceName).block(); + public Response listNotebookAccessTokenWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -2393,16 +2403,14 @@ public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { + return listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -2766,14 +2774,16 @@ private Mono listStorageAccountKeysAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { - return listStorageAccountKeysAsync(resourceGroupName, workspaceName).block(); + public Response listStorageAccountKeysWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -2781,16 +2791,14 @@ public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { + return listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -2908,14 +2916,16 @@ private Mono listNotebookKeysAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { - return listNotebookKeysAsync(resourceGroupName, workspaceName).block(); + public Response listNotebookKeysWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -2923,16 +2933,14 @@ public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { + return listNotebookKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -3051,15 +3059,17 @@ private Mono listOutboundNetworkDependenciesEndpoints * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints( - String resourceGroupName, String workspaceName) { - return listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, workspaceName).block(); + public Response listOutboundNetworkDependenciesEndpointsWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName, context) + .block(); } /** @@ -3067,23 +3077,23 @@ public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName, context) - .block(); + public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String workspaceName) { + return listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, Context.NONE) + .getValue(); } /** * 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 +3130,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 +3169,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 +3207,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/WorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java index 53eca25a795f..75bd16e0e657 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java @@ -42,15 +42,6 @@ public WorkspacesImpl( this.serviceManager = serviceManager; } - public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { - WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); - if (inner != null) { - return new WorkspaceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -66,6 +57,15 @@ public Response getByResourceGroupWithResponse( } } + public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { + WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); + if (inner != null) { + return new WorkspaceImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { this.serviceClient().delete(resourceGroupName, workspaceName); } @@ -85,16 +85,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, St return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } - public DiagnoseResponseResult diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - DiagnoseResponseResultInner inner = this.serviceClient().diagnose(resourceGroupName, workspaceName, parameters); - if (inner != null) { - return new DiagnoseResponseResultImpl(inner, this.manager()); - } else { - return null; - } - } - public DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName) { DiagnoseResponseResultInner inner = this.serviceClient().diagnose(resourceGroupName, workspaceName); if (inner != null) { @@ -115,15 +105,6 @@ public DiagnoseResponseResult diagnose( } } - public ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName) { - ListWorkspaceKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListWorkspaceKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listKeysWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -139,6 +120,15 @@ public Response listKeysWithResponse( } } + public ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName) { + ListWorkspaceKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); + if (inner != null) { + return new ListWorkspaceKeysResultImpl(inner, this.manager()); + } else { + return null; + } + } + public void resyncKeys(String resourceGroupName, String workspaceName) { this.serviceClient().resyncKeys(resourceGroupName, workspaceName); } @@ -157,16 +147,6 @@ public PagedIterable list(String skip, Context context) { return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } - public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName) { - NotebookAccessTokenResultInner inner = - this.serviceClient().listNotebookAccessToken(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookAccessTokenResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listNotebookAccessTokenWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -182,18 +162,18 @@ public Response listNotebookAccessTokenWithResponse( } } - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName) { - NotebookResourceInfoInner inner = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName); + public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName) { + NotebookAccessTokenResultInner inner = + this.serviceClient().listNotebookAccessToken(resourceGroupName, workspaceName); if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); + return new NotebookAccessTokenResultImpl(inner, this.manager()); } else { return null; } } - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - NotebookResourceInfoInner inner = - this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); + public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName) { + NotebookResourceInfoInner inner = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName); if (inner != null) { return new NotebookResourceInfoImpl(inner, this.manager()); } else { @@ -201,11 +181,11 @@ public NotebookResourceInfo prepareNotebook(String resourceGroupName, String wor } } - public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName) { - ListStorageAccountKeysResultInner inner = - this.serviceClient().listStorageAccountKeys(resourceGroupName, workspaceName); + public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { + NotebookResourceInfoInner inner = + this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); if (inner != null) { - return new ListStorageAccountKeysResultImpl(inner, this.manager()); + return new NotebookResourceInfoImpl(inner, this.manager()); } else { return null; } @@ -226,10 +206,11 @@ public Response listStorageAccountKeysWithResponse } } - public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { - ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); + public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName) { + ListStorageAccountKeysResultInner inner = + this.serviceClient().listStorageAccountKeys(resourceGroupName, workspaceName); if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); + return new ListStorageAccountKeysResultImpl(inner, this.manager()); } else { return null; } @@ -250,12 +231,10 @@ public Response listNotebookKeysWithResponse( } } - public ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints( - String resourceGroupName, String workspaceName) { - ExternalFqdnResponseInner inner = - this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName); + public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { + ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); if (inner != null) { - return new ExternalFqdnResponseImpl(inner, this.manager()); + return new ListNotebookKeysResultImpl(inner, this.manager()); } else { return null; } @@ -278,6 +257,17 @@ public Response listOutboundNetworkDependenciesEndpointsWi } } + public ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String workspaceName) { + ExternalFqdnResponseInner inner = + this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName); + if (inner != null) { + return new ExternalFqdnResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public Workspace getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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..a6d1684c5138 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of AccessKeyAuthTypeWorkspaceConnectionProperties class. */ + public AccessKeyAuthTypeWorkspaceConnectionProperties() { + } + + /** + * 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/AccountKeyDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java index 3f1a5c512d2c..3a914e9d9308 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java @@ -21,6 +21,10 @@ public final class AccountKeyDatastoreCredentials extends DatastoreCredentials { @JsonProperty(value = "secrets", required = true) private AccountKeyDatastoreSecrets secrets; + /** Creates an instance of AccountKeyDatastoreCredentials class. */ + public AccountKeyDatastoreCredentials() { + } + /** * Get the secrets property: [Required] Storage account secrets. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java index f73479d7c148..8f18b266e3a9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java @@ -21,6 +21,10 @@ public final class AccountKeyDatastoreSecrets extends DatastoreSecretsInner { @JsonProperty(value = "key") private String key; + /** Creates an instance of AccountKeyDatastoreSecrets class. */ + public AccountKeyDatastoreSecrets() { + } + /** * Get the key property: Storage account key. * 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..891afa4bad75 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.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.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; + + /** Creates an instance of AcrDetails class. */ + public AcrDetails() { + } + + /** + * 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..9bf5593b62ad 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 @@ -20,6 +20,10 @@ public final class Aks extends Compute { @JsonProperty(value = "properties") private AksSchemaProperties properties; + /** Creates an instance of Aks class. */ + public Aks() { + } + /** * Get the properties property: AKS properties. * @@ -54,13 +58,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..048c5141075b 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; @@ -35,6 +33,10 @@ public final class AksComputeSecrets extends ComputeSecretsInner { @JsonProperty(value = "imagePullSecretName") private String imagePullSecretName; + /** Creates an instance of AksComputeSecrets class. */ + public AksComputeSecrets() { + } + /** * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. 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..caf711390f87 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; @@ -30,6 +28,10 @@ public class AksComputeSecretsProperties { @JsonProperty(value = "imagePullSecretName") private String imagePullSecretName; + /** Creates an instance of AksComputeSecretsProperties class. */ + public AksComputeSecretsProperties() { + } + /** * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. 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..a66653a00d7d 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,27 +17,30 @@ 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; + /** Creates an instance of AksNetworkingConfiguration class. */ + public AksNetworkingConfiguration() { + } + /** * Get the subnetId property: Virtual network subnet resource ID the compute nodes belong to. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java index 09fe5b728922..892c30daeece 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java @@ -16,6 +16,10 @@ public class AksSchema { @JsonProperty(value = "properties") private AksSchemaProperties properties; + /** Creates an instance of AksSchema class. */ + public AksSchema() { + } + /** * Get the properties property: AKS properties. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java index e16df20dee8c..abef14024d16 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java @@ -65,6 +65,10 @@ public final class AksSchemaProperties { @JsonProperty(value = "loadBalancerSubnet") private String loadBalancerSubnet; + /** Creates an instance of AksSchemaProperties class. */ + public AksSchemaProperties() { + } + /** * Get the clusterFqdn property: Cluster full qualified domain name. * 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/AllNodes.java similarity index 70% 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/AllNodes.java index 31d7dc680c47..cf9fcd13ecef 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/AllNodes.java @@ -8,11 +8,15 @@ 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") +/** 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 PartialKubernetesOnlineDeployment extends PartialOnlineDeployment { +public final class AllNodes extends Nodes { + /** Creates an instance of AllNodes class. */ + public AllNodes() { + } + /** * 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..374d0d105960 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 @@ -20,6 +20,10 @@ public final class AmlCompute extends Compute { @JsonProperty(value = "properties") private AmlComputeProperties properties; + /** Creates an instance of AmlCompute class. */ + public AmlCompute() { + } + /** * Get the properties property: Properties of AmlCompute. * @@ -54,13 +58,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..fb5d1b5c24bb 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,59 @@ @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; + /** Creates an instance of AmlComputeNodeInformation class. */ + public AmlComputeNodeInformation() { + } + /** - * 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 +72,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 +83,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 +94,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 +115,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/AmlComputeNodesInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java index 7af05acd6697..66e875ffc3cb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java @@ -23,6 +23,10 @@ public final class AmlComputeNodesInformation { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of AmlComputeNodesInformation class. */ + public AmlComputeNodesInformation() { + } + /** * Get the nodes property: The collection of returned AmlCompute nodes details. * 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..7168c72acc8d 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,11 @@ 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; + + /** Creates an instance of AmlComputeProperties class. */ + public AmlComputeProperties() { + } /** * Get the osType property: Compute OS Type. @@ -306,11 +308,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 +323,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 +341,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 +356,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 +367,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 +378,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 +389,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 +411,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 +424,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 +443,7 @@ public AmlComputeProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { * * @return the propertyBag value. */ - public Map propertyBag() { + public Object propertyBag() { return this.propertyBag; } @@ -435,7 +453,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/AmlComputeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java index b6c1d9047d0f..d1c4ec002bad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java @@ -16,6 +16,10 @@ public class AmlComputeSchema { @JsonProperty(value = "properties") private AmlComputeProperties properties; + /** Creates an instance of AmlComputeSchema class. */ + public AmlComputeSchema() { + } + /** * Get the properties property: Properties of AmlCompute. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java index 380a81a1314b..2bf229e370c1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java @@ -34,6 +34,10 @@ public final class AmlOperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of AmlOperationDisplay class. */ + public AmlOperationDisplay() { + } + /** * Get the provider property: The resource provider name: Microsoft.MachineLearningExperimentation. * 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..9cc37821c536 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,17 @@ @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; + /** Creates an instance of AmlOperationListResult class. */ + public AmlOperationListResult() { + } + /** - * 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 +32,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/AmlToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java index 18fc827b87e4..03fbe387d4c7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java @@ -13,6 +13,10 @@ @JsonTypeName("AMLToken") @Immutable public final class AmlToken extends IdentityConfiguration { + /** Creates an instance of AmlToken class. */ + public AmlToken() { + } + /** * Validates the instance. * 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..f306ef8b8e55 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of ArmResourceId class. */ + public ArmResourceId() { + } + + /** + * Get the resourceId property: Arm ResourceId is in the format + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts" + + "/{StorageAccountName}" + * or + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry" + + "/registries/{AcrName}". + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Arm ResourceId is in the format + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts" + + "/{StorageAccountName}" + * or + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry" + + "/registries/{AcrName}". + * + * @param resourceId the resourceId value to set. + * @return the ArmResourceId object itself. + */ + public ArmResourceId withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java index fdcc76aee4bb..603e689cf5fa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java @@ -23,6 +23,10 @@ public class AssetBase extends ResourceBase { @JsonProperty(value = "isArchived") private Boolean isArchived; + /** Creates an instance of AssetBase class. */ + public AssetBase() { + } + /** * Get the isAnonymous property: If the name version are system generated (anonymous registration). * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java index 1abf68c3f566..6c5d657f3ba6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java @@ -29,6 +29,10 @@ public class AssetContainer extends ResourceBase { @JsonProperty(value = "nextVersion", access = JsonProperty.Access.WRITE_ONLY) private String nextVersion; + /** Creates an instance of AssetContainer class. */ + public AssetContainer() { + } + /** * Get the isArchived property: Is the asset archived?. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java index 96ca6b50b28a..afeecb043691 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java @@ -23,6 +23,10 @@ public class AssetJobInput { @JsonProperty(value = "uri", required = true) private String uri; + /** Creates an instance of AssetJobInput class. */ + public AssetJobInput() { + } + /** * Get the mode property: Input Asset Delivery Mode. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java index 751eedc3f0e0..e6c3f9463eab 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java @@ -22,6 +22,10 @@ public class AssetJobOutput { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of AssetJobOutput class. */ + public AssetJobOutput() { + } + /** * Get the mode property: Output Asset Delivery Mode. * 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/AssetReferenceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java index 70b370864db8..e19aef73ced2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java @@ -23,6 +23,10 @@ }) @Immutable public class AssetReferenceBase { + /** Creates an instance of AssetReferenceBase class. */ + public AssetReferenceBase() { + } + /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java index e3f592ceda5b..722668be4109 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java @@ -23,6 +23,10 @@ public final class AssignedUser { @JsonProperty(value = "tenantId", required = true) private String tenantId; + /** Creates an instance of AssignedUser class. */ + public AssignedUser() { + } + /** * Get the objectId property: User’s AAD Object Id. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java index 6eb5a7464053..bafe88b21f84 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java @@ -13,6 +13,10 @@ @JsonTypeName("Auto") @Immutable public final class AutoForecastHorizon extends ForecastHorizon { + /** Creates an instance of AutoForecastHorizon class. */ + public AutoForecastHorizon() { + } + /** * Validates the instance. * 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..a9118767dc85 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 @@ -55,6 +54,10 @@ public final class AutoMLJob extends JobBaseDetails { @JsonProperty(value = "taskDetails", required = true) private AutoMLVertical taskDetails; + /** Creates an instance of AutoMLJob class. */ + public AutoMLJob() { + } + /** * Get the environmentId property: The ARM resource ID of the Environment specification for the job. This is * optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment @@ -124,7 +127,7 @@ public AutoMLJob withOutputs(Map outputs) { * * @return the resources value. */ - public ResourceConfiguration resources() { + public JobResourceConfiguration resources() { return this.resources; } @@ -134,7 +137,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 +162,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 +204,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..827fdba1ef48 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,23 @@ 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; + + /** Creates an instance of AutoMLVertical class. */ + public AutoMLVertical() { + } + /** * Get the logVerbosity property: Log verbosity for the job. * @@ -57,11 +75,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/AutoNCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java index 177a96d92716..28b2d6e00151 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java @@ -13,6 +13,10 @@ @JsonTypeName("Auto") @Immutable public final class AutoNCrossValidations extends NCrossValidations { + /** Creates an instance of AutoNCrossValidations class. */ + public AutoNCrossValidations() { + } + /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java index 02ab158e712b..668bfa415df0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java @@ -22,6 +22,10 @@ public final class AutoPauseProperties { @JsonProperty(value = "enabled") private Boolean enabled; + /** Creates an instance of AutoPauseProperties class. */ + public AutoPauseProperties() { + } + /** * Get the delayInMinutes property: The delayInMinutes property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java index 90ff04e39be1..46ef9432e5a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java @@ -28,6 +28,10 @@ public final class AutoScaleProperties { @JsonProperty(value = "maxNodeCount") private Integer maxNodeCount; + /** Creates an instance of AutoScaleProperties class. */ + public AutoScaleProperties() { + } + /** * Get the minNodeCount property: The minNodeCount property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java index 451241be1f69..6b224b5c8fa5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java @@ -13,6 +13,10 @@ @JsonTypeName("Auto") @Immutable public final class AutoSeasonality extends Seasonality { + /** Creates an instance of AutoSeasonality class. */ + public AutoSeasonality() { + } + /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java index d8781e9bca1d..ac77cc101f2e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java @@ -13,6 +13,10 @@ @JsonTypeName("Auto") @Immutable public final class AutoTargetLags extends TargetLags { + /** Creates an instance of AutoTargetLags class. */ + public AutoTargetLags() { + } + /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java index 33f8abca5554..b628ecb4c4c5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java @@ -13,6 +13,10 @@ @JsonTypeName("Auto") @Immutable public final class AutoTargetRollingWindowSize extends TargetRollingWindowSize { + /** Creates an instance of AutoTargetRollingWindowSize class. */ + public AutoTargetRollingWindowSize() { + } + /** * Validates the instance. * 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..040f93e9bec5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutologgerSettings.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.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; + + /** Creates an instance of AutologgerSettings class. */ + public AutologgerSettings() { + } + + /** + * 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..183797f80830 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,27 @@ 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; + + /** Creates an instance of AzureBlobDatastore class. */ + public AzureBlobDatastore() { + } + /** * Get the accountName property: Storage account name. * @@ -149,6 +164,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..76d00b8b12d0 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,22 @@ 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; + + /** Creates an instance of AzureDataLakeGen1Datastore class. */ + public AzureDataLakeGen1Datastore() { + } + /** * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. @@ -72,6 +87,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..161847280db8 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,27 @@ 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; + + /** Creates an instance of AzureDataLakeGen2Datastore class. */ + public AzureDataLakeGen2Datastore() { + } + /** * Get the accountName property: [Required] Storage account name. * @@ -150,6 +165,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..5fa79bf3bdb0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of AzureDatastore class. */ + public AzureDatastore() { + } + + /** + * 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..96e5e7f2681b 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,27 @@ 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; + + /** Creates an instance of AzureFileDatastore class. */ + public AzureFileDatastore() { + } + /** * Get the accountName property: [Required] Storage account name. * @@ -151,6 +165,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/BanditPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java index 9721fc1f8f23..2fa766d834d8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java @@ -26,6 +26,10 @@ public final class BanditPolicy extends EarlyTerminationPolicy { @JsonProperty(value = "slackFactor") private Float slackFactor; + /** Creates an instance of BanditPolicy class. */ + public BanditPolicy() { + } + /** * Get the slackAmount property: Absolute distance allowed from the best performing run. * 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..c9edec18e058 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,20 +73,22 @@ 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; + /** Creates an instance of BatchDeploymentProperties class. */ + public BatchDeploymentProperties() { + } + /** * Get the compute property: Compute target for batch inference operation. * @@ -103,9 +102,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 +128,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 +148,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 +168,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 +190,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 +210,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 +230,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 +250,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 +272,7 @@ public DeploymentProvisioningState provisioningState() { * * @return the resources value. */ - public ResourceConfiguration resources() { + public DeploymentResourceConfiguration resources() { return this.resources; } @@ -282,9 +281,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 +303,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..32e17c4cdfd0 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,11 @@ public final class BatchDeploymentTrackedResourceArmPaginatedResult { * An array of objects of type BatchDeployment. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of BatchDeploymentTrackedResourceArmPaginatedResult class. */ + public BatchDeploymentTrackedResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional @@ -52,7 +55,7 @@ public BatchDeploymentTrackedResourceArmPaginatedResult withNextLink(String next * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..2566303aa8ad 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, @@ -82,12 +82,14 @@ void delete( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. * @param deploymentName The identifier for the Batch deployments. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. + * @return a batch inference deployment by id along with {@link Response}. */ - BatchDeploymentData get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); /** * Gets a batch inference deployment by id. @@ -96,14 +98,12 @@ void delete( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. + * @return a batch inference deployment by id. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** * Gets a batch inference deployment by id. @@ -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..00170d2cfd23 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 @@ -6,12 +6,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.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 +68,7 @@ public interface BatchEndpointData { * * @return the properties value. */ - BatchEndpointDetails properties(); + BatchEndpointProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -76,6 +77,13 @@ public interface BatchEndpointData { */ 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. * @@ -98,13 +106,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 +120,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 +143,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 +154,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 +162,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 +178,7 @@ interface WithCreate * * @return the created resource. */ - BatchEndpointData create(); + BatchEndpoint create(); /** * Executes the create request. @@ -178,9 +186,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 +198,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 +209,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 +221,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 +233,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 +254,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 +268,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 +279,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,25 +293,25 @@ 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. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ - EndpointAuthKeys listKeys(); + Response listKeysWithResponse(Context context); /** * Lists batch Inference Endpoint keys. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. + * @return keys for endpoint authentication. */ - Response listKeysWithResponse(Context context); + EndpointAuthKeys listKeys(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java index 21209aca29dd..aa25ce2802e2 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,12 +12,15 @@ 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; + /** Creates an instance of BatchEndpointDefaults class. */ + public BatchEndpointDefaults() { + } + /** * Get the deploymentName property: Name of the deployment that will be default for the endpoint. This deployment * will end up getting 100% traffic when the endpoint scoring URL is invoked. 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 78% 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..91f737a4bd0f 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 */ @@ -25,6 +25,10 @@ public final class BatchEndpointDetails extends EndpointPropertiesBaseInner { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private EndpointProvisioningState provisioningState; + /** Creates an instance of BatchEndpointProperties class. */ + public BatchEndpointProperties() { + } + /** * Get the defaults property: Default values for Batch Endpoint. * @@ -38,9 +42,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 +60,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..d2984db78bd8 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,11 @@ public final class BatchEndpointTrackedResourceArmPaginatedResult { * An array of objects of type BatchEndpoint. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of BatchEndpointTrackedResourceArmPaginatedResult class. */ + public BatchEndpointTrackedResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional @@ -52,7 +55,7 @@ public BatchEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLi * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..4762c037a92c 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); /** @@ -69,12 +69,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. + * @return a batch inference endpoint by name along with {@link Response}. */ - BatchEndpointData get(String resourceGroupName, String workspaceName, String endpointName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * Gets a batch inference endpoint by name. @@ -82,14 +84,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. + * @return a batch inference endpoint by name. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName); /** * Lists batch Inference Endpoint keys. @@ -97,12 +97,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ - EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); + Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * Lists batch Inference Endpoint keys. @@ -110,14 +112,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. + * @return keys for endpoint authentication. */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); /** * Gets a batch inference endpoint by name. @@ -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/BatchRetrySettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java index 8f5e019eb132..1d98496b92ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java @@ -23,6 +23,10 @@ public final class BatchRetrySettings { @JsonProperty(value = "timeout") private Duration timeout; + /** Creates an instance of BatchRetrySettings class. */ + public BatchRetrySettings() { + } + /** * Get the maxRetries property: Maximum retry count for a mini-batch. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java index 1fb6d0448a02..06e64fab9169 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java @@ -13,6 +13,10 @@ @JsonTypeName("Bayesian") @Immutable public final class BayesianSamplingAlgorithm extends SamplingAlgorithm { + /** Creates an instance of BayesianSamplingAlgorithm class. */ + public BayesianSamplingAlgorithm() { + } + /** * Validates the instance. * 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..512afe21f689 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.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; + +/** 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; + + /** Creates an instance of BindOptions class. */ + public BindOptions() { + } + + /** + * Get the propagation property: Type of Bind Option. + * + * @return the propagation value. + */ + public String propagation() { + return this.propagation; + } + + /** + * Set the propagation property: Type of Bind Option. + * + * @param propagation the propagation value to set. + * @return the BindOptions object itself. + */ + public BindOptions withPropagation(String propagation) { + this.propagation = propagation; + return this; + } + + /** + * Get the createHostPath property: Indicate whether to create host path. + * + * @return the createHostPath value. + */ + public Boolean createHostPath() { + return this.createHostPath; + } + + /** + * Set the createHostPath property: Indicate whether to create host path. + * + * @param createHostPath the createHostPath value to set. + * @return the BindOptions object itself. + */ + public BindOptions withCreateHostPath(Boolean createHostPath) { + this.createHostPath = createHostPath; + return this; + } + + /** + * Get the selinux property: Mention the selinux options. + * + * @return the selinux value. + */ + public String selinux() { + return this.selinux; + } + + /** + * Set the selinux property: Mention the selinux options. + * + * @param selinux the selinux value to set. + * @return the BindOptions object itself. + */ + public BindOptions withSelinux(String selinux) { + this.selinux = selinux; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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..5ee7e93ad42b 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; @@ -29,6 +26,10 @@ public final class BuildContext { @JsonProperty(value = "dockerfilePath") private String dockerfilePath; + /** Creates an instance of BuildContext class. */ + public BuildContext() { + } + /** * Get the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob * URIs on environment creation and may return blob or Git URIs. <seealso 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/CertificateDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java index 30953bfee4b5..028afea8b967 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java @@ -52,6 +52,10 @@ public final class CertificateDatastoreCredentials extends DatastoreCredentials @JsonProperty(value = "thumbprint", required = true) private String thumbprint; + /** Creates an instance of CertificateDatastoreCredentials class. */ + public CertificateDatastoreCredentials() { + } + /** * Get the authorityUrl property: Authority URL used for authentication. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java index 86d2e9c9e142..9024d4497f71 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java @@ -21,6 +21,10 @@ public final class CertificateDatastoreSecrets extends DatastoreSecretsInner { @JsonProperty(value = "certificate") private String certificate; + /** Creates an instance of CertificateDatastoreSecrets class. */ + public CertificateDatastoreSecrets() { + } + /** * Get the certificate property: Service principal certificate. * 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..62c494a06928 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,80 @@ 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; + + /** Creates an instance of Classification class. */ + public Classification() { } /** - * 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 +156,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 +215,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 +256,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 +432,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 +454,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..bd667f5bbbc4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; +import java.util.List; + +/** Classification Training related configuration. */ +@Fluent +public final class ClassificationTrainingSettings extends TrainingSettings { + /* + * Allowed models for classification task. + */ + @JsonProperty(value = "allowedTrainingAlgorithms") + private List allowedTrainingAlgorithms; + + /* + * Blocked models for classification task. + */ + @JsonProperty(value = "blockedTrainingAlgorithms") + private List blockedTrainingAlgorithms; + + /** Creates an instance of ClassificationTrainingSettings class. */ + public ClassificationTrainingSettings() { + } + + /** + * Get the allowedTrainingAlgorithms property: Allowed models for classification task. + * + * @return the allowedTrainingAlgorithms value. + */ + public List allowedTrainingAlgorithms() { + return this.allowedTrainingAlgorithms; + } + + /** + * Set the allowedTrainingAlgorithms property: Allowed models for classification task. + * + * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. + * @return the ClassificationTrainingSettings object itself. + */ + public ClassificationTrainingSettings withAllowedTrainingAlgorithms( + List allowedTrainingAlgorithms) { + this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; + return this; + } + + /** + * Get the blockedTrainingAlgorithms property: Blocked models for classification task. + * + * @return the blockedTrainingAlgorithms value. + */ + public List blockedTrainingAlgorithms() { + return this.blockedTrainingAlgorithms; + } + + /** + * Set the blockedTrainingAlgorithms property: Blocked models for classification task. + * + * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. + * @return the ClassificationTrainingSettings object itself. + */ + public ClassificationTrainingSettings withBlockedTrainingAlgorithms( + List blockedTrainingAlgorithms) { + this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; + return this; + } + + /** {@inheritDoc} */ + @Override + public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + super.withEnableDnnTraining(enableDnnTraining); + return this; + } + + /** {@inheritDoc} */ + @Override + public ClassificationTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + super.withEnableModelExplainability(enableModelExplainability); + return this; + } + + /** {@inheritDoc} */ + @Override + public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); + return this; + } + + /** {@inheritDoc} */ + @Override + public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { + super.withEnableStackEnsemble(enableStackEnsemble); + return this; + } + + /** {@inheritDoc} */ + @Override + public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { + super.withEnableVoteEnsemble(enableVoteEnsemble); + return this; + } + + /** {@inheritDoc} */ + @Override + public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { + super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); + return this; + } + + /** {@inheritDoc} */ + @Override + public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + super.withStackEnsembleSettings(stackEnsembleSettings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java 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/ClusterUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java index 045b388520ad..e375b833b2bf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java @@ -17,6 +17,10 @@ public final class ClusterUpdateParameters { @JsonProperty(value = "properties") private ClusterUpdateProperties innerProperties; + /** Creates an instance of ClusterUpdateParameters class. */ + public ClusterUpdateParameters() { + } + /** * Get the innerProperties property: The properties of the amlCompute. * 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..60c0b36ecae0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CocoExportSummary.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.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; + + /** Creates an instance of CocoExportSummary class. */ + public CocoExportSummary() { + } + + /** + * 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/CodeConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java index d0d7937bab0c..1da5ea3ab59c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java @@ -23,6 +23,10 @@ public final class CodeConfiguration { @JsonProperty(value = "scoringScript", required = true) private String scoringScript; + /** Creates an instance of CodeConfiguration class. */ + public CodeConfiguration() { + } + /** * Get the codeId property: ARM resource ID of the code asset. * 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/CodeContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerDetails.java deleted file mode 100644 index 76f0d72d1f46..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import java.util.Map; - -/** Container for code asset versions. */ -@Fluent -public final class CodeContainerDetails extends AssetContainer { - /** {@inheritDoc} */ - @Override - public CodeContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerDetails withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java new file mode 100644 index 000000000000..99fb7112a2c9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of CodeContainerProperties class. */ + public CodeContainerProperties() { + } + + /** + * Get the provisioningState property: Provisioning state for the code container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@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..fdb6888e079b 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,11 @@ public final class CodeContainerResourceArmPaginatedResult { * An array of objects of type CodeContainer. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of CodeContainerResourceArmPaginatedResult class. */ + public CodeContainerResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional @@ -52,7 +55,7 @@ public CodeContainerResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..c7e8f7eedd4b 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,19 +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); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Context context); /** * Delete container. @@ -63,7 +52,7 @@ public interface CodeContainers { Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -71,9 +60,8 @@ public interface CodeContainers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. */ - CodeContainerData get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -87,59 +75,49 @@ 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ - CodeContainerData getById(String id); + CodeContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get 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 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. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link 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. */ - CodeContainerData.DefinitionStages.Blank define(String name); + CodeContainer createOrUpdate(String resourceGroupName, String workspaceName, String name, CodeContainerInner body); } 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 59% 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..720f29ba1369 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,23 @@ /** 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; + + /** Creates an instance of CodeVersionProperties class. */ + public CodeVersionProperties() { + } + /** * Get the codeUri property: Uri where code is located. * @@ -30,44 +40,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..64ed58a5722f 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,11 @@ public final class CodeVersionResourceArmPaginatedResult { * An array of objects of type CodeVersion. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of CodeVersionResourceArmPaginatedResult class. */ + public CodeVersionResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional @@ -52,7 +55,7 @@ public CodeVersionResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..ed45eac7aa5d 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, @@ -47,19 +48,6 @@ PagedIterable list( String skip, Context context); - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - /** * Delete version. * @@ -77,7 +65,7 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -86,9 +74,8 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. */ - CodeVersionData get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -103,59 +90,58 @@ 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ - CodeVersionData getById(String id); + CodeVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get 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 version along with {@link Response}. + * @return azure Resource Manager resource envelope 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); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + CodeVersionInner body, + Context context); /** - * Delete version. + * Create or update version. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link 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. */ - CodeVersionData.DefinitionStages.Blank define(String name); + CodeVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java index 510e41ac10ba..649d7c174071 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java @@ -24,6 +24,10 @@ public final class ColumnTransformer { @JsonProperty(value = "parameters") private Object parameters; + /** Creates an instance of ColumnTransformer class. */ + public ColumnTransformer() { + } + /** * Get the fields property: Fields to apply transformer logic on. * 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..51867e8cf112 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,33 @@ public final class CommandJob extends JobBaseDetails { * Compute Resource configuration for the job. */ @JsonProperty(value = "resources") - private ResourceConfiguration resources; + private JobResourceConfiguration resources; + + /** Creates an instance of CommandJob class. */ + public CommandJob() { + } + + /** + * 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 +288,7 @@ public Object parameters() { * * @return the resources value. */ - public ResourceConfiguration resources() { + public JobResourceConfiguration resources() { return this.resources; } @@ -269,11 +298,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 +345,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 +381,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/CommandJobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java index 95b8cca543dc..5b2b21d51c28 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java @@ -14,6 +14,10 @@ @JsonTypeName("Command") @Fluent public final class CommandJobLimits extends JobLimits { + /** Creates an instance of CommandJobLimits class. */ + public CommandJobLimits() { + } + /** {@inheritDoc} */ @Override public CommandJobLimits withTimeout(Duration timeout) { 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 50% 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..951a246c2ccd 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,50 @@ * 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; + + /** Creates an instance of ComponentContainerProperties class. */ + public ComponentContainerProperties() { + } + + /** + * Get the provisioningState property: Provisioning state for the component container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@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..0be978c7adf2 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,11 @@ public final class ComponentContainerResourceArmPaginatedResult { * An array of objects of type ComponentContainer. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of ComponentContainerResourceArmPaginatedResult class. */ + public ComponentContainerResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no @@ -52,7 +55,7 @@ public ComponentContainerResourceArmPaginatedResult withNextLink(String nextLink * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..a7ac6a798ab3 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,21 +36,9 @@ 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); - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - /** * Delete container. * @@ -65,7 +54,7 @@ PagedIterable list( Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -73,9 +62,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 container. */ - ComponentContainerData get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -89,59 +77,50 @@ 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ - ComponentContainerData getById(String id); + ComponentContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get 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 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. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName 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 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. */ - ComponentContainerData.DefinitionStages.Blank define(String name); + ComponentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body); } 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 60% 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..387788d0b2b5 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,24 @@ /** 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; + + /** Creates an instance of ComponentVersionProperties class. */ + public ComponentVersionProperties() { + } + /** * Get the componentSpec property: Defines Component definition details. <see * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. @@ -35,44 +43,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..d78b0c57e190 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,11 @@ public final class ComponentVersionResourceArmPaginatedResult { * An array of objects of type ComponentVersion. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of ComponentVersionResourceArmPaginatedResult class. */ + public ComponentVersionResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no @@ -52,7 +55,7 @@ public ComponentVersionResourceArmPaginatedResult withNextLink(String nextLink) * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..3ba3472d9399 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, @@ -49,19 +50,6 @@ PagedIterable list( ListViewType listViewType, Context context); - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - /** * Delete version. * @@ -79,7 +67,7 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -88,9 +76,8 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. */ - ComponentVersionData get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -105,59 +92,58 @@ 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ - ComponentVersionData getById(String id); + ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get 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 version along with {@link Response}. + * @return azure Resource Manager resource envelope 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); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ComponentVersionInner body, + Context context); /** - * Delete version. + * Create or update version. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName 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 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. */ - ComponentVersionData.DefinitionStages.Blank define(String name); + ComponentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java index ad954b0114c7..ab18ca66332a 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,19 +77,22 @@ 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; + /** Creates an instance of Compute class. */ + public Compute() { + } + /** * Get the computeLocation property: Location for the underlying compute. * @@ -106,7 +108,7 @@ public String computeLocation() { * * @return the provisioningState value. */ - public ProvisioningState provisioningState() { + public ComputeProvisioningState provisioningState() { return this.provisioningState; } @@ -197,18 +199,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..feb51a5e723d 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 @@ -20,6 +20,10 @@ public final class ComputeInstance extends Compute { @JsonProperty(value = "properties") private ComputeInstanceProperties properties; + /** Creates an instance of ComputeInstance class. */ + public ComputeInstance() { + } + /** * Get the properties property: Properties of ComputeInstance. * @@ -54,13 +58,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/ComputeInstanceApplication.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java index 911b3c2a4887..efaf0271b71e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java @@ -22,6 +22,10 @@ public final class ComputeInstanceApplication { @JsonProperty(value = "endpointUri") private String endpointUri; + /** Creates an instance of ComputeInstanceApplication class. */ + public ComputeInstanceApplication() { + } + /** * Get the displayName property: Name of the ComputeInstance application. * 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..2079ea6bc6f1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.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.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; + + /** Creates an instance of ComputeInstanceAutologgerSettings class. */ + public ComputeInstanceAutologgerSettings() { + } + + /** + * 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..f0cb84e7f405 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,12 +17,15 @@ 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; + /** Creates an instance of ComputeInstanceConnectivityEndpoints class. */ + public ComputeInstanceConnectivityEndpoints() { + } + /** * Get the publicIpAddress property: Public IP Address of this ComputeInstance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java index 1bc1fd8c4d5a..e9b49d988547 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java @@ -47,6 +47,10 @@ public final class ComputeInstanceContainer { @JsonProperty(value = "services", access = JsonProperty.Access.WRITE_ONLY) private List services; + /** Creates an instance of ComputeInstanceContainer class. */ + public ComputeInstanceContainer() { + } + /** * Get the name property: Name of the ComputeInstance container. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java index 66ad36df4c65..91652991d01b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java @@ -28,6 +28,10 @@ public final class ComputeInstanceCreatedBy { @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY) private String userId; + /** Creates an instance of ComputeInstanceCreatedBy class. */ + public ComputeInstanceCreatedBy() { + } + /** * Get the username property: Name of the user. * 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..3c23d8dd308d 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; @@ -35,6 +37,10 @@ public final class ComputeInstanceDataDisk { @JsonProperty(value = "storageAccountType") private StorageAccountType storageAccountType; + /** Creates an instance of ComputeInstanceDataDisk class. */ + public ComputeInstanceDataDisk() { + } + /** * Get the caching property: Caching type of Data Disk. * @@ -76,8 +82,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 +94,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..b5c6decae93d 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; @@ -65,6 +67,10 @@ public final class ComputeInstanceDataMount { @JsonProperty(value = "error") private String error; + /** Creates an instance of ComputeInstanceDataMount class. */ + public ComputeInstanceDataMount() { + } + /** * Get the source property: Source of the ComputeInstance data mount. * @@ -206,7 +212,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 +223,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/ComputeInstanceEnvironmentInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java index 821a64d74ee1..d0e05ed76298 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java @@ -22,6 +22,10 @@ public final class ComputeInstanceEnvironmentInfo { @JsonProperty(value = "version") private String version; + /** Creates an instance of ComputeInstanceEnvironmentInfo class. */ + public ComputeInstanceEnvironmentInfo() { + } + /** * Get the name property: name of environment. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java index 714b6e8abef2..3f656ff40efc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java @@ -35,6 +35,10 @@ public final class ComputeInstanceLastOperation { @JsonProperty(value = "operationTrigger") private OperationTrigger operationTrigger; + /** Creates an instance of ComputeInstanceLastOperation class. */ + public ComputeInstanceLastOperation() { + } + /** * Get the operationName property: Name of the last operation. * 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..d2b20dd6a22c 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; @@ -136,6 +163,10 @@ public final class ComputeInstanceProperties { @JsonProperty(value = "versions", access = JsonProperty.Access.WRITE_ONLY) private ComputeInstanceVersion versions; + /** Creates an instance of ComputeInstanceProperties class. */ + public ComputeInstanceProperties() { + } + /** * Get the vmSize property: Virtual Machine Size. * @@ -177,10 +208,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 +221,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 +235,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 +275,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 +332,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 +352,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 +363,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 +436,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 +471,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 +530,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/ComputeInstanceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java index b3c107babdb4..48d4b12a0ab3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java @@ -16,6 +16,10 @@ public class ComputeInstanceSchema { @JsonProperty(value = "properties") private ComputeInstanceProperties properties; + /** Creates an instance of ComputeInstanceSchema class. */ + public ComputeInstanceSchema() { + } + /** * Get the properties property: Properties of ComputeInstance. * 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..fa34e74a5889 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,22 @@ 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; + /** Creates an instance of ComputeInstanceSshSettings class. */ + public ComputeInstanceSshSettings() { + } + /** - * Get the sshPublicAccess property: Access policy for SSH State of the public SSH port. Possible values are: - * Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh - * port is open and accessible according to the VNet/subnet policy if applicable. + * 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 +57,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/ComputeInstanceVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java index 4541e9393c23..e8b7f1b2d1cb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java @@ -16,6 +16,10 @@ public final class ComputeInstanceVersion { @JsonProperty(value = "runtime") private String runtime; + /** Creates an instance of ComputeInstanceVersion class. */ + public ComputeInstanceVersion() { + } + /** * Get the runtime property: Runtime of compute instance. * 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..307ce3debdb6 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -286,23 +309,23 @@ interface WithProperties { /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link + * Response}. */ - ComputeSecrets listKeys(); + Response listKeysWithResponse(Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). */ - Response listKeysWithResponse(Context context); + ComputeSecrets listKeys(); /** * Posts a start action to a compute instance. @@ -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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java index 8179eb165635..4b0b7c7000d2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java @@ -16,6 +16,10 @@ public class ComputeResourceSchema { @JsonProperty(value = "properties") private Compute properties; + /** Creates an instance of ComputeResourceSchema class. */ + public ComputeResourceSchema() { + } + /** * Get the properties property: Compute properties. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java index 957090e82390..78b9effb9a9f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java @@ -17,6 +17,10 @@ public final class ComputeSchedules { @JsonProperty(value = "computeStartStop") private List computeStartStop; + /** Creates an instance of ComputeSchedules class. */ + public ComputeSchedules() { + } + /** * Get the computeStartStop property: The list of compute start stop schedules to be applied. * 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..4c4775150ade 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,47 @@ 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; + /** Creates an instance of ComputeStartStopSchedule class. */ + public ComputeStartStopSchedule() { + } + /** - * Get the id property: Schedule id. + * Get the id property: A system assigned id for the schedule. * * @return the id value. */ @@ -53,7 +81,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 +110,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 +121,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 +190,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 +206,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..a3bb10d67abc 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 { @@ -43,12 +44,14 @@ public interface Computes { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. + * @return compute definition by its name along with {@link Response}. */ - ComputeResource get(String resourceGroupName, String workspaceName, String computeName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String computeName, Context context); /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use @@ -57,14 +60,12 @@ public interface Computes { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response}. + * @return compute definition by its name. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); + ComputeResource get(String resourceGroupName, String workspaceName, String computeName); /** * Deletes specified Machine Learning compute. @@ -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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -141,12 +176,15 @@ PagedIterable listNodes( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link + * Response}. */ - ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName); + Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String computeName, Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). @@ -154,15 +192,12 @@ PagedIterable listNodes( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); + ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName); /** * Posts a start action to a compute instance. @@ -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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + /** * 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/ContainerResourceRequirements.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java index 1229c8deac10..433207abb090 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java @@ -22,6 +22,10 @@ public final class ContainerResourceRequirements { @JsonProperty(value = "containerResourceRequests") private ContainerResourceSettings containerResourceRequests; + /** Creates an instance of ContainerResourceRequirements class. */ + public ContainerResourceRequirements() { + } + /** * Get the containerResourceLimits property: Container resource limit info:. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java index a4d57c97d647..ef47459f3731 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java @@ -31,6 +31,10 @@ public final class ContainerResourceSettings { @JsonProperty(value = "memory") private String memory; + /** Creates an instance of ContainerResourceSettings class. */ + public ContainerResourceSettings() { + } + /** * Get the cpu property: Number of vCPUs request/limit for container. More info: * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java index c62c842c2b15..0b05e1cfaf60 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java @@ -16,6 +16,10 @@ public final class CosmosDbSettings { @JsonProperty(value = "collectionsThroughput") private Integer collectionsThroughput; + /** Creates an instance of CosmosDbSettings class. */ + public CosmosDbSettings() { + } + /** * Get the collectionsThroughput property: The throughput of the collections in cosmosdb database. * 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..e0be7b771ec0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.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 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; + + /** Creates an instance of Cron class. */ + public Cron() { + } + + /** + * Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @param startTime the startTime value to set. + * @return the Cron object itself. + */ + public Cron withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @param timeZone the timeZone value to set. + * @return the Cron object itself. + */ + public Cron withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow + * NCronTab format. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: [Required] Specifies cron expression of schedule. The expression should follow + * NCronTab format. + * + * @param expression the expression value to set. + * @return the Cron object itself. + */ + public Cron withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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..362c9d532dc8 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. @@ -23,6 +22,10 @@ public final class CronSchedule extends ScheduleBase { @JsonProperty(value = "expression", required = true) private String expression; + /** Creates an instance of CronTrigger class. */ + public CronTrigger() { + } + /** * Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow * NCronTab format. @@ -38,37 +41,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 +80,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..3c500c994ef4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CsvExportSummary.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.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; + + /** Creates an instance of CsvExportSummary class. */ + public CsvExportSummary() { + } + + /** + * 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/CustomForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java index 9ce0dc4eed47..495856b62f74 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java @@ -20,6 +20,10 @@ public final class CustomForecastHorizon extends ForecastHorizon { @JsonProperty(value = "value", required = true) private int value; + /** Creates an instance of CustomForecastHorizon class. */ + public CustomForecastHorizon() { + } + /** * Get the value property: [Required] Forecast horizon value. * 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..65061d9cdf22 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 { /* @@ -27,6 +27,10 @@ public final class CustomModelJobInput extends JobInput { @JsonProperty(value = "uri", required = true) private String uri; + /** Creates an instance of CustomModelJobInput class. */ + public CustomModelJobInput() { + } + /** * Get the mode property: Input Asset Delivery Mode. * 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..b68ea2621db9 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 { /* @@ -26,6 +26,10 @@ public final class CustomModelJobOutput extends JobOutput { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of CustomModelJobOutput class. */ + public CustomModelJobOutput() { + } + /** * Get the mode property: Output Asset Delivery Mode. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java index 047df7e240d0..fb61bff1cc77 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java @@ -20,6 +20,10 @@ public final class CustomNCrossValidations extends NCrossValidations { @JsonProperty(value = "value", required = true) private int value; + /** Creates an instance of CustomNCrossValidations class. */ + public CustomNCrossValidations() { + } + /** * Get the value property: [Required] N-Cross validations value. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java index 821cad528057..d9b507c43f12 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java @@ -20,6 +20,10 @@ public final class CustomSeasonality extends Seasonality { @JsonProperty(value = "value", required = true) private int value; + /** Creates an instance of CustomSeasonality class. */ + public CustomSeasonality() { + } + /** * Get the value property: [Required] Seasonality value. * 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..a2534931c611 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** Creates an instance of CustomService class. */ + public CustomService() { + } + + /** + * Get the name property: Name of the Custom Service. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the Custom Service. + * + * @param name the name value to set. + * @return the CustomService object itself. + */ + public CustomService withName(String name) { + this.name = name; + return this; + } + + /** + * Get the image property: Describes the Image Specifications. + * + * @return the image value. + */ + public Image image() { + return this.image; + } + + /** + * Set the image property: Describes the Image Specifications. + * + * @param image the image value to set. + * @return the CustomService object itself. + */ + public CustomService withImage(Image image) { + this.image = image; + return this; + } + + /** + * Get the environmentVariables property: Environment Variable for the container. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment Variable for the container. + * + * @param environmentVariables the environmentVariables value to set. + * @return the CustomService object itself. + */ + public CustomService withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the docker property: Describes the docker settings for the image. + * + * @return the docker value. + */ + public Docker docker() { + return this.docker; + } + + /** + * Set the docker property: Describes the docker settings for the image. + * + * @param docker the docker value to set. + * @return the CustomService object itself. + */ + public CustomService withDocker(Docker docker) { + this.docker = docker; + return this; + } + + /** + * Get the endpoints property: Configuring the endpoints for the container. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: Configuring the endpoints for the container. + * + * @param endpoints the endpoints value to set. + * @return the CustomService object itself. + */ + public CustomService withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the volumes property: Configuring the volumes for the container. + * + * @return the volumes value. + */ + public List volumes() { + return this.volumes; + } + + /** + * Set the volumes property: Configuring the volumes for the container. + * + * @param volumes the volumes value to set. + * @return the CustomService object itself. + */ + public CustomService withVolumes(List volumes) { + this.volumes = volumes; + return this; + } + + /** + * Get the additionalProperties property: Specifies the custom service configuration. + * + * @return the additionalProperties value. + */ + @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/CustomTargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java index 91639619b4d5..1c3a2db01db9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java @@ -22,6 +22,10 @@ public final class CustomTargetLags extends TargetLags { @JsonProperty(value = "values", required = true) private List values; + /** Creates an instance of CustomTargetLags class. */ + public CustomTargetLags() { + } + /** * Get the values property: [Required] Set target lags values. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java index d2b709e271c7..a6809abe95b3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java @@ -20,6 +20,10 @@ public final class CustomTargetRollingWindowSize extends TargetRollingWindowSize @JsonProperty(value = "value", required = true) private int value; + /** Creates an instance of CustomTargetRollingWindowSize class. */ + public CustomTargetRollingWindowSize() { + } + /** * Get the value property: [Required] TargetRollingWindowSize value. * 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 69% 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..ef6dbc31be3d 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,13 +11,17 @@ /** Container for data asset versions. */ @Fluent -public final class DataContainerDetails extends AssetContainer { +public final class DataContainerProperties extends AssetContainer { /* * [Required] Specifies the type of data. */ @JsonProperty(value = "dataType", required = true) private DataType dataType; + /** Creates an instance of DataContainerProperties class. */ + public DataContainerProperties() { + } + /** * Get the dataType property: [Required] Specifies the type of data. * @@ -31,37 +35,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 +81,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..df54e8cfb2e1 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,11 @@ public final class DataContainerResourceArmPaginatedResult { * An array of objects of type DataContainer. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of DataContainerResourceArmPaginatedResult class. */ + public DataContainerResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional @@ -52,7 +55,7 @@ public DataContainerResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..8962c038ec25 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); /** @@ -44,11 +44,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String name); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Delete container. @@ -56,13 +58,11 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -70,12 +70,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return container along with {@link Response}. */ - DataContainerData get(String resourceGroupName, String workspaceName, String name); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); /** * Get container. @@ -83,14 +85,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + DataContainer get(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -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..082093585020 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 @@ -13,6 +13,10 @@ @JsonTypeName("DataFactory") @Fluent public final class DataFactory extends Compute { + /** Creates an instance of DataFactory class. */ + public DataFactory() { + } + /** {@inheritDoc} */ @Override public DataFactory withDescription(String description) { @@ -27,13 +31,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..1401e08d0d66 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 @@ -20,6 +20,10 @@ public final class DataLakeAnalytics extends Compute { @JsonProperty(value = "properties") private DataLakeAnalyticsSchemaProperties properties; + /** Creates an instance of DataLakeAnalytics class. */ + public DataLakeAnalytics() { + } + /** * Get the properties property: The properties property. * @@ -54,13 +58,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/DataLakeAnalyticsSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java index e8645412a72d..8d9dd38b62f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java @@ -16,6 +16,10 @@ public class DataLakeAnalyticsSchema { @JsonProperty(value = "properties") private DataLakeAnalyticsSchemaProperties properties; + /** Creates an instance of DataLakeAnalyticsSchema class. */ + public DataLakeAnalyticsSchema() { + } + /** * Get the properties property: The properties property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java index 101006cd02e7..645bc27f9f93 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java @@ -16,6 +16,10 @@ public final class DataLakeAnalyticsSchemaProperties { @JsonProperty(value = "dataLakeStoreAccountName") private String dataLakeStoreAccountName; + /** Creates an instance of DataLakeAnalyticsSchemaProperties class. */ + public DataLakeAnalyticsSchemaProperties() { + } + /** * Get the dataLakeStoreAccountName property: DataLake Store Account Name. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java index a107820dcd14..f9425ac02511 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java @@ -26,6 +26,10 @@ public final class DataPathAssetReference extends AssetReferenceBase { @JsonProperty(value = "path") private String path; + /** Creates an instance of DataPathAssetReference class. */ + public DataPathAssetReference() { + } + /** * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. * 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 64% 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..d52c8fc01f5a 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,29 @@ 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; + /** Creates an instance of DataVersionBaseProperties class. */ + public DataVersionBaseProperties() { + } + /** * Get the dataUri property: [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. + * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001Preview.Assets.DataVersionBase.DataType. * * @return the dataUri value. */ @@ -45,47 +49,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 +105,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..6e8048afa408 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,11 @@ public final class DataVersionBaseResourceArmPaginatedResult { * An array of objects of type DataVersionBase. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of DataVersionBaseResourceArmPaginatedResult class. */ + public DataVersionBaseResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional @@ -52,7 +55,7 @@ public DataVersionBaseResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..e5234415cf8b 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, @@ -60,11 +60,14 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String name, String version); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Delete version. @@ -73,14 +76,11 @@ PagedIterable list( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -89,12 +89,14 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return version along with {@link Response}. */ - DataVersionBaseData get(String resourceGroupName, String workspaceName, String name, String version); + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); /** * Get version. @@ -103,14 +105,12 @@ Response deleteWithResponse( * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -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..5f90a2ae3083 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 @@ -20,6 +20,10 @@ public final class Databricks extends Compute { @JsonProperty(value = "properties") private DatabricksProperties properties; + /** Creates an instance of Databricks class. */ + public Databricks() { + } + /** * Get the properties property: Properties of Databricks. * @@ -54,13 +58,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/DatabricksComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java index 065d8833f10b..bd9f0dfb69f7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java @@ -21,6 +21,10 @@ public final class DatabricksComputeSecrets extends ComputeSecretsInner { @JsonProperty(value = "databricksAccessToken") private String databricksAccessToken; + /** Creates an instance of DatabricksComputeSecrets class. */ + public DatabricksComputeSecrets() { + } + /** * Get the databricksAccessToken property: access token for databricks account. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java index b5246b28d347..3415468a0077 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java @@ -16,6 +16,10 @@ public class DatabricksComputeSecretsProperties { @JsonProperty(value = "databricksAccessToken") private String databricksAccessToken; + /** Creates an instance of DatabricksComputeSecretsProperties class. */ + public DatabricksComputeSecretsProperties() { + } + /** * Get the databricksAccessToken property: access token for databricks account. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java index 94ba35df77d4..5fff72428cc6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java @@ -22,6 +22,10 @@ public final class DatabricksProperties { @JsonProperty(value = "workspaceUrl") private String workspaceUrl; + /** Creates an instance of DatabricksProperties class. */ + public DatabricksProperties() { + } + /** * Get the databricksAccessToken property: Databricks access token. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java index 6bbbe7973791..b67e4f948343 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java @@ -16,6 +16,10 @@ public class DatabricksSchema { @JsonProperty(value = "properties") private DatabricksProperties properties; + /** Creates an instance of DatabricksSchema class. */ + public DatabricksSchema() { + } + /** * Get the properties property: Properties of Databricks. * 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..30cf13948f52 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetExportSummary.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.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; + + /** Creates an instance of DatasetExportSummary class. */ + public DatasetExportSummary() { + } + + /** + * 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..7b181093c6e2 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,25 +184,25 @@ 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. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets. + * @return datastore secrets along with {@link Response}. */ - DatastoreSecrets listSecrets(); + Response listSecretsWithResponse(Context context); /** * Get datastore secrets. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response}. + * @return datastore secrets. */ - Response listSecretsWithResponse(Context context); + DatastoreSecrets listSecrets(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java index 98423ce9668d..f96f516951e8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java @@ -27,6 +27,10 @@ }) @Immutable public class DatastoreCredentials { + /** Creates an instance of DatastoreCredentials class. */ + public DatastoreCredentials() { + } + /** * Validates the instance. * 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 81% 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..591308872d83 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,12 +35,15 @@ 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; + /** Creates an instance of DatastoreProperties class. */ + public DatastoreProperties() { + } + /** * Get the credentials property: [Required] Account credentials. * @@ -54,9 +57,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 +75,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 +105,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..9acb559cf7ec 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,11 @@ public final class DatastoreResourceArmPaginatedResult { * An array of objects of type Datastore. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of DatastoreResourceArmPaginatedResult class. */ + public DatastoreResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of Datastore objects. If null, there are no additional @@ -52,7 +55,7 @@ public DatastoreResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..d3adbfe3d9cd 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, @@ -59,11 +59,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String name); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Delete datastore. @@ -71,13 +73,11 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get datastore. @@ -85,12 +85,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore. + * @return datastore along with {@link Response}. */ - DatastoreData get(String resourceGroupName, String workspaceName, String name); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** * Get datastore. @@ -98,14 +99,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. + * @return datastore. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Datastore get(String resourceGroupName, String workspaceName, String name); /** * Get datastore secrets. @@ -113,12 +112,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets. + * @return datastore secrets along with {@link Response}. */ - DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name); + Response listSecretsWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); /** * Get datastore secrets. @@ -126,14 +127,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response}. + * @return datastore secrets. */ - Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name); /** * Get datastore. @@ -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/DefaultScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java index c4bc75c6bc65..0dbc03ac6538 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java @@ -13,6 +13,10 @@ @JsonTypeName("Default") @Immutable public final class DefaultScaleSettings extends OnlineScaleSettings { + /** Creates an instance of DefaultScaleSettings class. */ + public DefaultScaleSettings() { + } + /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java index 8987ef7af753..12a5f06c5c2e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java @@ -22,6 +22,10 @@ public final class DeploymentLogsRequest { @JsonProperty(value = "tail") private Integer tail; + /** Creates an instance of DeploymentLogsRequest class. */ + public DeploymentLogsRequest() { + } + /** * Get the containerType property: The type of container to retrieve logs from. * 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/ModelContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java similarity index 55% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java index 20fcd6820c0f..652e1c26d99e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java @@ -7,34 +7,31 @@ import com.azure.core.annotation.Fluent; import java.util.Map; -/** The ModelContainerDetails model. */ +/** The DeploymentResourceConfiguration model. */ @Fluent -public final class ModelContainerDetails extends AssetContainer { - /** {@inheritDoc} */ - @Override - public ModelContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; +public final class DeploymentResourceConfiguration extends ResourceConfiguration { + /** Creates an instance of DeploymentResourceConfiguration class. */ + public DeploymentResourceConfiguration() { } /** {@inheritDoc} */ @Override - public ModelContainerDetails withDescription(String description) { - super.withDescription(description); + public DeploymentResourceConfiguration withInstanceCount(Integer instanceCount) { + super.withInstanceCount(instanceCount); return this; } /** {@inheritDoc} */ @Override - public ModelContainerDetails withProperties(Map properties) { - super.withProperties(properties); + public DeploymentResourceConfiguration withInstanceType(String instanceType) { + super.withInstanceType(instanceType); return this; } /** {@inheritDoc} */ @Override - public ModelContainerDetails withTags(Map tags) { - super.withTags(tags); + public DeploymentResourceConfiguration withProperties(Map properties) { + super.withProperties(properties); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java index a2e2d791b641..cb9851aa8b82 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java @@ -75,6 +75,10 @@ public final class DiagnoseRequestProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map others; + /** Creates an instance of DiagnoseRequestProperties class. */ + public DiagnoseRequestProperties() { + } + /** * Get the udr property: Setting for diagnosing user defined routing. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java index fc5ac2440523..81e242c0c4ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java @@ -65,6 +65,10 @@ public final class DiagnoseResponseResultValue { @JsonProperty(value = "otherResults") private List otherResults; + /** Creates an instance of DiagnoseResponseResultValue class. */ + public DiagnoseResponseResultValue() { + } + /** * Get the userDefinedRouteResults property: The userDefinedRouteResults property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java index 0014136f6e15..f7eb4471ab30 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java @@ -28,6 +28,10 @@ public final class DiagnoseResult { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; + /** Creates an instance of DiagnoseResult class. */ + public DiagnoseResult() { + } + /** * Get the code property: Code for workspace setup error. * 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/DiagnoseWorkspaceParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java index 837627bed536..f0a37ececc46 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java @@ -16,6 +16,10 @@ public final class DiagnoseWorkspaceParameters { @JsonProperty(value = "value") private DiagnoseRequestProperties value; + /** Creates an instance of DiagnoseWorkspaceParameters class. */ + public DiagnoseWorkspaceParameters() { + } + /** * Get the value property: Value of Parameters. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java index 258d1a16db26..059ddfa4210a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java @@ -23,6 +23,10 @@ }) @Immutable public class DistributionConfiguration { + /** Creates an instance of DistributionConfiguration class. */ + public DistributionConfiguration() { + } + /** * Validates the instance. * 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..20dd07aa4235 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** Creates an instance of Docker class. */ + public Docker() { + } + + /** + * Get the privileged property: Indicate whether container shall run in privileged or non-privileged mode. + * + * @return the privileged value. + */ + public Boolean privileged() { + return this.privileged; + } + + /** + * Set the privileged property: Indicate whether container shall run in privileged or non-privileged mode. + * + * @param privileged the privileged value to set. + * @return the Docker object itself. + */ + public Docker withPrivileged(Boolean privileged) { + this.privileged = privileged; + return this; + } + + /** + * Get the additionalProperties property: 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/EarlyTerminationPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java index faee0ea56724..213796629764 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java @@ -36,6 +36,10 @@ public class EarlyTerminationPolicy { @JsonProperty(value = "evaluationInterval") private Integer evaluationInterval; + /** Creates an instance of EarlyTerminationPolicy class. */ + public EarlyTerminationPolicy() { + } + /** * Get the delayEvaluation property: Number of intervals by which to delay the first evaluation. * 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..b5dece8ac6ee 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,12 +24,15 @@ 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; + /** Creates an instance of EncryptionKeyVaultProperties class. */ + public EncryptionKeyVaultProperties() { + } + /** * Get the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. * 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..8a6b1c3ea050 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.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.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; + + /** Creates an instance of EncryptionKeyVaultUpdateProperties class. */ + public EncryptionKeyVaultUpdateProperties() { + } + + /** + * 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..a56f01ee36e6 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; @@ -30,6 +29,10 @@ public final class EncryptionProperty { @JsonProperty(value = "keyVaultProperties", required = true) private EncryptionKeyVaultProperties keyVaultProperties; + /** Creates an instance of EncryptionProperty class. */ + public EncryptionProperty() { + } + /** * Get the status property: Indicates whether or not the encryption is enabled for the workspace. * 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..7462c0c945b3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.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.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; + + /** Creates an instance of EncryptionUpdateProperties class. */ + public EncryptionUpdateProperties() { + } + + /** + * 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..8965468c6791 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.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.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; + + /** Creates an instance of Endpoint class. */ + public Endpoint() { + } + + /** + * 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..77c525258f2d 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,13 +38,16 @@ 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) private Map properties; + /** Creates an instance of EndpointDeploymentPropertiesBase class. */ + public EndpointDeploymentPropertiesBase() { + } + /** * Get the codeConfiguration property: Code configuration for the endpoint deployment. * 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..1fc068802e76 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The EndpointScheduleAction model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") +@JsonTypeName("InvokeBatchEndpoint") +@Fluent +public final class EndpointScheduleAction extends ScheduleActionBase { + /* + * [Required] Defines Schedule action definition details. + * + */ + @JsonProperty(value = "endpointInvocationDefinition", required = true) + private Object endpointInvocationDefinition; + + /** Creates an instance of EndpointScheduleAction class. */ + public EndpointScheduleAction() { + } + + /** + * Get the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. <see + * href="TBD" />. + * + * @return the endpointInvocationDefinition value. + */ + public Object endpointInvocationDefinition() { + return this.endpointInvocationDefinition; + } + + /** + * Set the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. <see + * href="TBD" />. + * + * @param endpointInvocationDefinition the endpointInvocationDefinition value to set. + * @return the EndpointScheduleAction object itself. + */ + public EndpointScheduleAction withEndpointInvocationDefinition(Object endpointInvocationDefinition) { + this.endpointInvocationDefinition = endpointInvocationDefinition; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (endpointInvocationDefinition() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property endpointInvocationDefinition in model EndpointScheduleAction")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EndpointScheduleAction.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/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/EnvironmentContainerDetails.java deleted file mode 100644 index fe093805a4b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import java.util.Map; - -/** Container for environment specification versions. */ -@Fluent -public final class EnvironmentContainerDetails extends AssetContainer { - /** {@inheritDoc} */ - @Override - public EnvironmentContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerDetails withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java new file mode 100644 index 000000000000..8457c845624e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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 environment specification versions. */ +@Fluent +public final class EnvironmentContainerProperties extends AssetContainer { + /* + * Provisioning state for the environment container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /** Creates an instance of EnvironmentContainerProperties class. */ + public EnvironmentContainerProperties() { + } + + /** + * Get the provisioningState property: Provisioning state for the environment container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@inheritDoc} */ + @Override + public EnvironmentContainerProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public EnvironmentContainerProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public EnvironmentContainerProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public EnvironmentContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java index e092db27c6b0..80da987c4f2f 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,11 @@ public final class EnvironmentContainerResourceArmPaginatedResult { * An array of objects of type EnvironmentContainer. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of EnvironmentContainerResourceArmPaginatedResult class. */ + public EnvironmentContainerResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no @@ -52,7 +55,7 @@ public EnvironmentContainerResourceArmPaginatedResult withNextLink(String nextLi * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..2981052ad42d 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,21 +36,9 @@ 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); - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - /** * Delete container. * @@ -65,7 +54,7 @@ PagedIterable list( Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -73,9 +62,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 container. */ - EnvironmentContainerData get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -89,59 +77,50 @@ 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ - EnvironmentContainerData getById(String id); + EnvironmentContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get 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 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. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link 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. */ - EnvironmentContainerData.DefinitionStages.Blank define(String name); + EnvironmentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body); } 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..4e44d10cecb8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** Creates an instance of EnvironmentVariable class. */ + public EnvironmentVariable() { + } + + /** + * 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 74% 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..2d0fbbec1bca 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,16 @@ 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; + + /** Creates an instance of EnvironmentVersionProperties class. */ + public EnvironmentVersionProperties() { + } + /** * Get the build property: Configuration settings for Docker build context. * @@ -72,9 +79,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 +105,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 +141,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 +161,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 +181,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..a0c6920ca097 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,11 @@ public final class EnvironmentVersionResourceArmPaginatedResult { * An array of objects of type EnvironmentVersion. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of EnvironmentVersionResourceArmPaginatedResult class. */ + public EnvironmentVersionResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no @@ -52,7 +55,7 @@ public EnvironmentVersionResourceArmPaginatedResult withNextLink(String nextLink * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..a218e7031a0c 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, @@ -49,19 +50,6 @@ PagedIterable list( ListViewType listViewType, Context context); - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - /** * Delete version. * @@ -79,7 +67,7 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -88,9 +76,8 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. */ - EnvironmentVersionData get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -105,59 +92,58 @@ 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ - EnvironmentVersionData getById(String id); + EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get 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 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. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + EnvironmentVersionInner body, + Context context); /** - * Delete version. + * Creates or updates an EnvironmentVersion. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentVersionData resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentVersionData definition. + * @return azure Resource Manager resource envelope. */ - EnvironmentVersionData.DefinitionStages.Blank define(String name); + EnvironmentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java index d6d2ed9180c3..a4fe18a7395d 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,37 @@ @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; + /** Creates an instance of EstimatedVMPrice class. */ + public EstimatedVMPrice() { + } + /** - * 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 +51,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 +64,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 +75,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 +88,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 +99,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..577bbbb091f9 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,37 @@ @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; + /** Creates an instance of EstimatedVMPrices class. */ + public EstimatedVMPrices() { + } + /** - * Get the billingCurrency property: Billing currency Three lettered code specifying the currency of the VM price. - * Example: USD. + * Get the billingCurrency property: Billing currency + * + *

Three lettered code specifying the currency of the VM price. Example: USD. * * @return the billingCurrency value. */ @@ -44,8 +52,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 +65,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 +76,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 +89,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 +100,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/FeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java index d56b97221980..49b68df8ae44 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java @@ -16,6 +16,10 @@ public class FeaturizationSettings { @JsonProperty(value = "datasetLanguage") private String datasetLanguage; + /** Creates an instance of FeaturizationSettings class. */ + public FeaturizationSettings() { + } + /** * Get the datasetLanguage property: Dataset language, useful for the text data. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java index 497826d32735..24c41610e553 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java @@ -19,6 +19,10 @@ public final class FlavorData { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map data; + /** Creates an instance of FlavorData class. */ + public FlavorData() { + } + /** * Get the data property: Model flavor-specific data. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java index c9b79c3e310b..6bb995553e44 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java @@ -22,6 +22,10 @@ }) @Immutable public class ForecastHorizon { + /** Creates an instance of ForecastHorizon class. */ + public ForecastHorizon() { + } + /** * Validates the instance. * 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..0d6c8e57787e 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,49 +58,61 @@ 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; + + /** Creates an instance of Forecasting class. */ + public Forecasting() { } /** @@ -144,22 +156,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 +215,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 +256,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 +432,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 +457,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..b611d6da822a 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; @@ -109,6 +99,10 @@ public final class ForecastingSettings { @JsonProperty(value = "useStl") private UseStl useStl; + /** Creates an instance of ForecastingSettings class. */ + public ForecastingSettings() { + } + /** * Get the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. These should * be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. 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..baf43d0f6fbf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; +import java.util.List; + +/** Forecasting Training related configuration. */ +@Fluent +public final class ForecastingTrainingSettings extends TrainingSettings { + /* + * Allowed models for forecasting task. + */ + @JsonProperty(value = "allowedTrainingAlgorithms") + private List allowedTrainingAlgorithms; + + /* + * Blocked models for forecasting task. + */ + @JsonProperty(value = "blockedTrainingAlgorithms") + private List blockedTrainingAlgorithms; + + /** Creates an instance of ForecastingTrainingSettings class. */ + public ForecastingTrainingSettings() { + } + + /** + * Get the allowedTrainingAlgorithms property: Allowed models for forecasting task. + * + * @return the allowedTrainingAlgorithms value. + */ + public List allowedTrainingAlgorithms() { + return this.allowedTrainingAlgorithms; + } + + /** + * Set the allowedTrainingAlgorithms property: Allowed models for forecasting task. + * + * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. + * @return the ForecastingTrainingSettings object itself. + */ + public ForecastingTrainingSettings withAllowedTrainingAlgorithms( + List allowedTrainingAlgorithms) { + this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; + return this; + } + + /** + * Get the blockedTrainingAlgorithms property: Blocked models for forecasting task. + * + * @return the blockedTrainingAlgorithms value. + */ + public List blockedTrainingAlgorithms() { + return this.blockedTrainingAlgorithms; + } + + /** + * Set the blockedTrainingAlgorithms property: Blocked models for forecasting task. + * + * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. + * @return the ForecastingTrainingSettings object itself. + */ + public ForecastingTrainingSettings withBlockedTrainingAlgorithms( + List blockedTrainingAlgorithms) { + this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; + return this; + } + + /** {@inheritDoc} */ + @Override + public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + super.withEnableDnnTraining(enableDnnTraining); + return this; + } + + /** {@inheritDoc} */ + @Override + public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + super.withEnableModelExplainability(enableModelExplainability); + return this; + } + + /** {@inheritDoc} */ + @Override + public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); + return this; + } + + /** {@inheritDoc} */ + @Override + public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { + super.withEnableStackEnsemble(enableStackEnsemble); + return this; + } + + /** {@inheritDoc} */ + @Override + public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { + super.withEnableVoteEnsemble(enableVoteEnsemble); + return this; + } + + /** {@inheritDoc} */ + @Override + public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { + super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); + return this; + } + + /** {@inheritDoc} */ + @Override + public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + super.withStackEnsembleSettings(stackEnsembleSettings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java index ab45f4eb4647..f5da7736f78c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java @@ -23,6 +23,10 @@ public final class FqdnEndpoint { @JsonProperty(value = "endpointDetails") private List endpointDetails; + /** Creates an instance of FqdnEndpoint class. */ + public FqdnEndpoint() { + } + /** * Get the domainName property: The domainName property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java index b90c3a27e948..e2b5c5930b28 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java @@ -16,6 +16,10 @@ public final class FqdnEndpointDetail { @JsonProperty(value = "port") private Integer port; + /** Creates an instance of FqdnEndpointDetail class. */ + public FqdnEndpointDetail() { + } + /** * Get the port property: The port property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java index a1159f6b1d14..e858af2ff001 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java @@ -16,6 +16,10 @@ public final class FqdnEndpoints { @JsonProperty(value = "properties") private FqdnEndpointsProperties properties; + /** Creates an instance of FqdnEndpoints class. */ + public FqdnEndpoints() { + } + /** * Get the properties property: The properties property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java index 5fa1056c3d8b..6cf5fe68fb94 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java @@ -23,6 +23,10 @@ public final class FqdnEndpointsProperties { @JsonProperty(value = "endpoints") private List endpoints; + /** Creates an instance of FqdnEndpointsProperties class. */ + public FqdnEndpointsProperties() { + } + /** * Get the category property: The category property. * 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/GridSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java index 95ed2225a6ca..1e60d81c65f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java @@ -13,6 +13,10 @@ @JsonTypeName("Grid") @Immutable public final class GridSamplingAlgorithm extends SamplingAlgorithm { + /** Creates an instance of GridSamplingAlgorithm class. */ + public GridSamplingAlgorithm() { + } + /** * Validates the instance. * 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..a5558dca5647 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 @@ -20,6 +20,10 @@ public final class HDInsight extends Compute { @JsonProperty(value = "properties") private HDInsightProperties properties; + /** Creates an instance of HDInsight class. */ + public HDInsight() { + } + /** * Get the properties property: HDInsight compute properties. * @@ -54,13 +58,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/HDInsightProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java index 9ec6e52adfac..bc6f0165cefe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java @@ -28,6 +28,10 @@ public final class HDInsightProperties { @JsonProperty(value = "administratorAccount") private VirtualMachineSshCredentials administratorAccount; + /** Creates an instance of HDInsightProperties class. */ + public HDInsightProperties() { + } + /** * Get the sshPort property: Port open for ssh connections on the master node of the cluster. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java index 3359fc67d9d8..cd4faac3dfc6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java @@ -16,6 +16,10 @@ public class HDInsightSchema { @JsonProperty(value = "properties") private HDInsightProperties properties; + /** Creates an instance of HDInsightSchema class. */ + public HDInsightSchema() { + } + /** * Get the properties property: HDInsight compute properties. * 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..24c6954ca887 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; @@ -35,6 +34,10 @@ public final class HdfsDatastore extends DatastoreDetails { @JsonProperty(value = "protocol") private String protocol; + /** Creates an instance of HdfsDatastore class. */ + public HdfsDatastore() { + } + /** * Get the hdfsServerCertificate property: The TLS cert of the HDFS server. Needs to be a base64 encoded string. * Required if "Https" protocol is selected. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java index 4c4b923e9a0c..2ed4fa9fd76c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java @@ -21,6 +21,10 @@ public final class IdAssetReference extends AssetReferenceBase { @JsonProperty(value = "assetId", required = true) private String assetId; + /** Creates an instance of IdAssetReference class. */ + public IdAssetReference() { + } + /** * Get the assetId property: [Required] ARM resource ID of the asset. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java index 6bedd1f4e4be..c0a1ddcffc39 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java @@ -23,6 +23,10 @@ }) @Immutable public class IdentityConfiguration { + /** Creates an instance of IdentityConfiguration class. */ + public IdentityConfiguration() { + } + /** * Validates the instance. * 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..9e86918bfd7a 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,12 +11,15 @@ @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; + /** Creates an instance of IdentityForCmk class. */ + public IdentityForCmk() { + } + /** * Get the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the * customer managed key vault. 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..727e692d78dd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.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.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; + + /** Creates an instance of IdleShutdownSetting class. */ + public IdleShutdownSetting() { + } + + /** + * 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..011b1f441c1c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** Creates an instance of Image class. */ + public Image() { + } + + /** + * 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..96f4c3e36fb1 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,24 @@ 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; + + /** Creates an instance of ImageClassification class. */ + public ImageClassification() { + } + /** * Get the primaryMetric property: Primary metric to optimize for this task. * @@ -119,28 +129,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 +257,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..b0042428c4cc 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,12 +18,15 @@ 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; + /** Creates an instance of ImageClassificationBase class. */ + public ImageClassificationBase() { + } + /** * Get the modelSettings property: Settings used for training the model. * @@ -68,22 +71,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,24 @@ 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; + + /** Creates an instance of ImageClassificationMultilabel class. */ + public ImageClassificationMultilabel() { + } + /** * Get the primaryMetric property: Primary metric to optimize for this task. * @@ -120,28 +130,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 +170,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 +219,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 +247,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 +258,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..83c6fb3614ba 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,24 @@ 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; + + /** Creates an instance of ImageInstanceSegmentation class. */ + public ImageInstanceSegmentation() { + } + /** * Get the primaryMetric property: Primary metric to optimize for this task. * @@ -119,28 +129,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 +257,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/ImageLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java index 470ee3ddfa6e..3bacfabcce46 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java @@ -29,6 +29,10 @@ public final class ImageLimitSettings { @JsonProperty(value = "timeout") private Duration timeout; + /** Creates an instance of ImageLimitSettings class. */ + public ImageLimitSettings() { + } + /** * Get the maxConcurrentTrials property: Maximum number of concurrent AutoML iterations. * 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..ce8a78506769 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.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; + +/** 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; + + /** Creates an instance of ImageMetadata class. */ + public ImageMetadata() { + } + + /** + * Get the currentImageVersion property: Specifies the current operating system image version this compute instance + * is running on. + * + * @return the currentImageVersion value. + */ + public String currentImageVersion() { + return this.currentImageVersion; + } + + /** + * Set the currentImageVersion property: Specifies the current operating system image version this compute instance + * is running on. + * + * @param currentImageVersion the currentImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withCurrentImageVersion(String currentImageVersion) { + this.currentImageVersion = currentImageVersion; + return this; + } + + /** + * Get the latestImageVersion property: Specifies the latest available operating system image version. + * + * @return the latestImageVersion value. + */ + public String latestImageVersion() { + return this.latestImageVersion; + } + + /** + * Set the latestImageVersion property: Specifies the latest available operating system image version. + * + * @param latestImageVersion the latestImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withLatestImageVersion(String latestImageVersion) { + this.latestImageVersion = latestImageVersion; + return this; + } + + /** + * Get the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest + * operating system image. + * + * @return the isLatestOsImageVersion value. + */ + public Boolean isLatestOsImageVersion() { + return this.isLatestOsImageVersion; + } + + /** + * Set the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest + * operating system image. + * + * @param isLatestOsImageVersion the isLatestOsImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withIsLatestOsImageVersion(Boolean isLatestOsImageVersion) { + this.isLatestOsImageVersion = isLatestOsImageVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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..968ea07751a8 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,26 +179,27 @@ 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; + /** Creates an instance of ImageModelDistributionSettings class. */ + public ImageModelDistributionSettings() { + } + /** * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. * @@ -666,28 +644,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..5615072d4437 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,34 +18,34 @@ @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; + /** Creates an instance of ImageModelDistributionSettingsClassification class. */ + public ImageModelDistributionSettingsClassification() { + } + /** * Get the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. * Must be a positive integer. @@ -281,13 +281,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..20c36d838c76 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,19 +102,21 @@ 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; + /** Creates an instance of ImageModelDistributionSettingsObjectDetection class. */ + public ImageModelDistributionSettingsObjectDetection() { + } + /** * Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. @@ -570,13 +561,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..bd105b216e35 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,26 +197,27 @@ 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; + /** Creates an instance of ImageModelSettings class. */ + public ImageModelSettings() { + } + /** * Get the advancedSettings property: Settings for advanced scenarios. * @@ -355,66 +323,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 +744,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 +900,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..27e3463da73d 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,34 +14,34 @@ @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; + /** Creates an instance of ImageModelSettingsClassification class. */ + public ImageModelSettingsClassification() { + } + /** * Get the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. * Must be a positive integer. @@ -167,22 +167,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 +305,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..aa171c49914d 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; @@ -120,6 +108,10 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings @JsonProperty(value = "validationMetricType") private ValidationMetricType validationMetricType; + /** Creates an instance of ImageModelSettingsObjectDetection class. */ + public ImageModelSettingsObjectDetection() { + } + /** * Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. @@ -451,22 +443,15 @@ public ImageModelSettingsObjectDetection withBeta2(Float beta2) { /** {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withCheckpointDatasetId(String checkpointDatasetId) { - super.withCheckpointDatasetId(checkpointDatasetId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsObjectDetection withCheckpointFilename(String checkpointFilename) { - super.withCheckpointFilename(checkpointFilename); + public ImageModelSettingsObjectDetection withCheckpointFrequency(Integer checkpointFrequency) { + super.withCheckpointFrequency(checkpointFrequency); return this; } /** {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withCheckpointFrequency(Integer checkpointFrequency) { - super.withCheckpointFrequency(checkpointFrequency); + public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { + super.withCheckpointModel(checkpointModel); return this; } @@ -596,13 +581,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..3e331ef4ba45 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,24 @@ 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; + + /** Creates an instance of ImageObjectDetection class. */ + public ImageObjectDetection() { + } + /** * Get the primaryMetric property: Primary metric to optimize for this task. * @@ -119,28 +129,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 +257,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..e3a955e714ba 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,12 +18,15 @@ 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; + /** Creates an instance of ImageObjectDetectionBase class. */ + public ImageObjectDetectionBase() { + } + /** * Get the modelSettings property: Settings used for training the model. * @@ -68,22 +71,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..01fc3de24e7d 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,26 +26,22 @@ 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; + + /** Creates an instance of ImageVertical class. */ + public ImageVertical() { } /** @@ -95,19 +84,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 +142,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..78878676f326 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,12 +23,15 @@ 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; + /** Creates an instance of InferenceContainerProperties class. */ + public InferenceContainerProperties() { + } + /** * Get the livenessRoute property: The route to check the liveness of the inference server container. * 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/InstanceTypeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java index 48d8d28f9935..af0266978dd8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java @@ -25,6 +25,10 @@ public final class InstanceTypeSchema { @JsonProperty(value = "resources") private InstanceTypeSchemaResources resources; + /** Creates an instance of InstanceTypeSchema class. */ + public InstanceTypeSchema() { + } + /** * Get the nodeSelector property: Node Selector. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java index ccc6ff2a9b2b..661d7afb7006 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java @@ -26,6 +26,10 @@ public final class InstanceTypeSchemaResources { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map limits; + /** Creates an instance of InstanceTypeSchemaResources class. */ + public InstanceTypeSchemaResources() { + } + /** * Get the requests property: Resource requests for this instance type. * 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..be06da4409a1 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,30 @@ public class JobBaseDetails extends ResourceBase { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private JobStatus status; + /** Creates an instance of JobBaseProperties class. */ + public JobBaseProperties() { + } + + /** + * Get the componentId property: ARM resource ID of the component resource. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Set the componentId property: ARM resource ID of the component resource. + * + * @param componentId the componentId value to set. + * @return the JobBaseProperties object itself. + */ + public JobBaseProperties withComponentId(String componentId) { + this.componentId = componentId; + return this; + } + /** * Get the computeId property: ARM resource ID of the compute resource. * @@ -96,9 +117,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 +137,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 +159,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 +181,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 +201,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 +223,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 +241,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 +271,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..c9675b3e0c18 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,11 @@ public final class JobBaseResourceArmPaginatedResult { * An array of objects of type JobBase. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of JobBaseResourceArmPaginatedResult class. */ + public JobBaseResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. @@ -50,7 +53,7 @@ public JobBaseResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -60,7 +63,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..5cba43503e85 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 { @@ -34,6 +34,10 @@ public class JobInput { @JsonProperty(value = "description") private String description; + /** Creates an instance of JobInput class. */ + public JobInput() { + } + /** * Get the description property: Description for the input. * 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..c79da820462a 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,12 +25,16 @@ @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; + /** Creates an instance of JobLimits class. */ + public JobLimits() { + } + /** * Get the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled. Only * supports duration with precision as low as Seconds. 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..b8c523ed40f2 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 { @@ -33,6 +33,10 @@ public class JobOutput { @JsonProperty(value = "description") private String description; + /** Creates an instance of JobOutput class. */ + public JobOutput() { + } + /** * Get the description property: Description for the output. * 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..37e80aca4c90 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The JobResourceConfiguration model. */ +@Fluent +public final class JobResourceConfiguration extends ResourceConfiguration { + /* + * Extra arguments to pass to the Docker run command. This would override any parameters that have already been set + * by the system, or in this section. This parameter is only supported for Azure ML compute types. + */ + @JsonProperty(value = "dockerArgs") + private String dockerArgs; + + /* + * Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number + * as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). + */ + @JsonProperty(value = "shmSize") + private String shmSize; + + /** Creates an instance of JobResourceConfiguration class. */ + public JobResourceConfiguration() { + } + + /** + * Get the dockerArgs property: Extra arguments to pass to the Docker run command. This would override any + * parameters that have already been set by the system, or in this section. This parameter is only supported for + * Azure ML compute types. + * + * @return the dockerArgs value. + */ + public String dockerArgs() { + return this.dockerArgs; + } + + /** + * Set the dockerArgs property: Extra arguments to pass to the Docker run command. This would override any + * parameters that have already been set by the system, or in this section. This parameter is only supported for + * Azure ML compute types. + * + * @param dockerArgs the dockerArgs value to set. + * @return the JobResourceConfiguration object itself. + */ + public JobResourceConfiguration withDockerArgs(String dockerArgs) { + this.dockerArgs = dockerArgs; + return this; + } + + /** + * Get the shmSize property: Size of the docker container's shared memory block. This should be in the format of + * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), + * m(megabytes), or g(gigabytes). + * + * @return the shmSize value. + */ + public String shmSize() { + return this.shmSize; + } + + /** + * Set the shmSize property: Size of the docker container's shared memory block. This should be in the format of + * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), + * m(megabytes), or g(gigabytes). + * + * @param shmSize the shmSize value to set. + * @return the JobResourceConfiguration object itself. + */ + public JobResourceConfiguration withShmSize(String shmSize) { + this.shmSize = shmSize; + return this; + } + + /** {@inheritDoc} */ + @Override + public JobResourceConfiguration withInstanceCount(Integer instanceCount) { + super.withInstanceCount(instanceCount); + return this; + } + + /** {@inheritDoc} */ + @Override + public JobResourceConfiguration withInstanceType(String instanceType) { + super.withInstanceType(instanceType); + return this; + } + + /** {@inheritDoc} */ + @Override + public JobResourceConfiguration withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java new file mode 100644 index 000000000000..c1c7ffbdf77a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The JobScheduleAction model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") +@JsonTypeName("CreateJob") +@Fluent +public final class JobScheduleAction extends ScheduleActionBase { + /* + * [Required] Defines Schedule action definition details. + */ + @JsonProperty(value = "jobDefinition", required = true) + private JobBaseProperties jobDefinition; + + /** Creates an instance of JobScheduleAction class. */ + public JobScheduleAction() { + } + + /** + * Get the jobDefinition property: [Required] Defines Schedule action definition details. + * + * @return the jobDefinition value. + */ + public JobBaseProperties jobDefinition() { + return this.jobDefinition; + } + + /** + * Set the jobDefinition property: [Required] Defines Schedule action definition details. + * + * @param jobDefinition the jobDefinition value to set. + * @return the JobScheduleAction object itself. + */ + public JobScheduleAction withJobDefinition(JobBaseProperties jobDefinition) { + this.jobDefinition = jobDefinition; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (jobDefinition() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property jobDefinition in model JobScheduleAction")); + } else { + jobDefinition().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JobScheduleAction.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java index ee961f84b0f5..67a37a625a0d 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; @@ -49,6 +56,10 @@ public final class JobService { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; + /** Creates an instance of JobService class. */ + public JobService() { + } + /** * Get the endpoint property: Url for endpoint. * @@ -99,7 +110,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 +141,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 +186,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..ca4e22b48f9b 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, @@ -81,12 +81,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id. + * @return a Job by name/id along with {@link Response}. */ - JobBaseData get(String resourceGroupName, String workspaceName, String id); + Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); /** * Gets a Job by name/id. @@ -94,16 +95,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. + * @return a Job by name/id. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + JobBase get(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. @@ -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..869b90847ba7 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,12 +24,16 @@ 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; + /** Creates an instance of KerberosCredentials class. */ + public KerberosCredentials() { + } + /** * Get the kerberosKdcAddress property: [Required] IP Address or DNS HostName. * 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..ecdf2887888d 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,12 +34,16 @@ 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; + /** Creates an instance of KerberosKeytabCredentials class. */ + public KerberosKeytabCredentials() { + } + /** * Get the secrets property: [Required] Keytab secrets. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java index 9176bce6dd06..64fa0dd35445 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java @@ -21,6 +21,10 @@ public final class KerberosKeytabSecrets extends DatastoreSecretsInner { @JsonProperty(value = "kerberosKeytab") private String kerberosKeytab; + /** Creates an instance of KerberosKeytabSecrets class. */ + public KerberosKeytabSecrets() { + } + /** * Get the kerberosKeytab property: Kerberos keytab secret. * 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..da085d1bed1f 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,12 +34,16 @@ 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; + /** Creates an instance of KerberosPasswordCredentials class. */ + public KerberosPasswordCredentials() { + } + /** * Get the secrets property: [Required] Kerberos password secrets. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java index 487d41bb7965..47c790ad259e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java @@ -21,6 +21,10 @@ public final class KerberosPasswordSecrets extends DatastoreSecretsInner { @JsonProperty(value = "kerberosPassword") private String kerberosPassword; + /** Creates an instance of KerberosPasswordSecrets class. */ + public KerberosPasswordSecrets() { + } + /** * Get the kerberosPassword property: Kerberos password secret. * 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..2d81e05f6df9 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 @@ -20,6 +20,10 @@ public final class Kubernetes extends Compute { @JsonProperty(value = "properties") private KubernetesProperties properties; + /** Creates an instance of Kubernetes class. */ + public Kubernetes() { + } + /** * Get the properties property: Properties of Kubernetes. * @@ -54,13 +58,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..9a07bac3c9c5 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,13 +14,17 @@ @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). */ @JsonProperty(value = "containerResourceRequirements") private ContainerResourceRequirements containerResourceRequirements; + /** Creates an instance of KubernetesOnlineDeployment class. */ + public KubernetesOnlineDeployment() { + } + /** * Get the containerResourceRequirements property: The resource requirements for the container (cpu and memory). * @@ -85,13 +89,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/KubernetesProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java index a24aab918d11..a361ed5f3a58 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java @@ -61,6 +61,10 @@ public final class KubernetesProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map instanceTypes; + /** Creates an instance of KubernetesProperties class. */ + public KubernetesProperties() { + } + /** * Get the relayConnectionString property: Relay connection string. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java index b2f81c3e0178..98634b93fcb3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java @@ -16,6 +16,10 @@ public class KubernetesSchema { @JsonProperty(value = "properties") private KubernetesProperties properties; + /** Creates an instance of KubernetesSchema class. */ + public KubernetesSchema() { + } + /** * Get the properties property: Properties of Kubernetes. * 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..dc82290dfe03 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelCategory.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** Creates an instance of LabelCategory class. */ + public LabelCategory() { + } + + /** + * 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..e2cc32c60665 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelClass.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** Creates an instance of LabelClass class. */ + public LabelClass() { + } + + /** + * 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..339774e9a574 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingDataConfiguration.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of LabelingDataConfiguration class. */ + public LabelingDataConfiguration() { + } + + /** + * 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..71f933b1e0d8 --- /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. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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(); + + /** + * 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..2868d47897bb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobImageProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.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; + + /** Creates an instance of LabelingJobImageProperties class. */ + public LabelingJobImageProperties() { + } + + /** + * 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..cadb65421d24 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobInstructions.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.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; + + /** Creates an instance of LabelingJobInstructions class. */ + public LabelingJobInstructions() { + } + + /** + * 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/LabelingJobMediaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobMediaProperties.java new file mode 100644 index 000000000000..d1c37858b3bf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobMediaProperties.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.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Properties of a labeling job. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "mediaType", + defaultImpl = LabelingJobMediaProperties.class) +@JsonTypeName("LabelingJobMediaProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Image", value = LabelingJobImageProperties.class), + @JsonSubTypes.Type(name = "Text", value = LabelingJobTextProperties.class) +}) +@Immutable +public class LabelingJobMediaProperties { + /** Creates an instance of LabelingJobMediaProperties class. */ + public LabelingJobMediaProperties() { + } + + /** + * 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/LabelingJobProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobProperties.java new file mode 100644 index 000000000000..9fac93fd5cde --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobProperties.java @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code 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; + + /** Creates an instance of LabelingJobProperties class. */ + public LabelingJobProperties() { + } + + /** + * 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..a41dace4b221 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobResourceArmPaginatedResult.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.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; + + /** Creates an instance of LabelingJobResourceArmPaginatedResult class. */ + public LabelingJobResourceArmPaginatedResult() { + } + + /** + * 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..2214bbc535b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobTextProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.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; + + /** Creates an instance of LabelingJobTextProperties class. */ + public LabelingJobTextProperties() { + } + + /** + * 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..3df8533e226b --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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); + + /** + * 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); + + /** + * 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..4eb345cb6c34 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,13 +19,16 @@ 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; + /** Creates an instance of ListAmlUserFeatureResult class. */ + public ListAmlUserFeatureResult() { + } + /** * Get the value property: The list of AML user facing features. * 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..dd06b71d3580 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,13 +19,16 @@ 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; + /** Creates an instance of ListUsagesResult class. */ + public ListUsagesResult() { + } + /** * Get the value property: The list of AML resource usages. * 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..a54a6f6a93f0 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,13 +19,16 @@ 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; + /** Creates an instance of ListWorkspaceQuotas class. */ + public ListWorkspaceQuotas() { + } + /** * Get the value property: The list of Workspace Quotas by VM Family. * 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..bd08d1b9305a 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 { /* @@ -21,6 +21,10 @@ public final class LiteralJobInput extends JobInput { @JsonProperty(value = "value", required = true) private String value; + /** Creates an instance of LiteralJobInput class. */ + public LiteralJobInput() { + } + /** * Get the value property: [Required] Literal value for the input. * 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/MLAssistConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.java new file mode 100644 index 000000000000..7f1792ea61e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.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.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; + +/** Labeling MLAssist configuration definition. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "mlAssist", + defaultImpl = MLAssistConfiguration.class) +@JsonTypeName("MLAssistConfiguration") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Disabled", value = MLAssistConfigurationDisabled.class), + @JsonSubTypes.Type(name = "Enabled", value = MLAssistConfigurationEnabled.class) +}) +@Immutable +public class MLAssistConfiguration { + /** Creates an instance of MLAssistConfiguration class. */ + public MLAssistConfiguration() { + } + + /** + * 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/PartialManagedOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java similarity index 65% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedOnlineDeployment.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java index a44f5303a123..1555d0007913 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedOnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java @@ -8,11 +8,15 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Properties specific to a ManagedOnlineDeployment. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") -@JsonTypeName("Managed") +/** Labeling MLAssist configuration definition when MLAssist is disabled. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mlAssist") +@JsonTypeName("Disabled") @Immutable -public final class PartialManagedOnlineDeployment extends PartialOnlineDeployment { +public final class MLAssistConfigurationDisabled extends MLAssistConfiguration { + /** Creates an instance of MLAssistConfigurationDisabled class. */ + public MLAssistConfigurationDisabled() { + } + /** * 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..a7beeffa663d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationEnabled.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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; + + /** Creates an instance of MLAssistConfigurationEnabled class. */ + public MLAssistConfigurationEnabled() { + } + + /** + * 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..375ee999b449 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 { /* @@ -27,6 +27,10 @@ public final class MLFlowModelJobInput extends JobInput { @JsonProperty(value = "uri", required = true) private String uri; + /** Creates an instance of MLFlowModelJobInput class. */ + public MLFlowModelJobInput() { + } + /** * Get the mode property: Input Asset Delivery Mode. * 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..e695c2c2e12c 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 { /* @@ -26,6 +26,10 @@ public final class MLFlowModelJobOutput extends JobOutput { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of MLFlowModelJobOutput class. */ + public MLFlowModelJobOutput() { + } + /** * Get the mode property: Output Asset Delivery Mode. * 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..009f42261a0e 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,15 +13,19 @@ /** 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) */ @JsonProperty(value = "referencedUris") private List referencedUris; + /** Creates an instance of MLTableData class. */ + public MLTableData() { + } + /** * Get the referencedUris property: Uris referenced in the MLTable definition (required for lineage). * 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..fa1f992030c3 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 { /* @@ -27,6 +27,10 @@ public final class MLTableJobInput extends JobInput { @JsonProperty(value = "uri", required = true) private String uri; + /** Creates an instance of MLTableJobInput class. */ + public MLTableJobInput() { + } + /** * Get the mode property: Input Asset Delivery Mode. * 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..168360d6a015 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 { /* @@ -26,6 +26,10 @@ public final class MLTableJobOutput extends JobOutput { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of MLTableJobOutput class. */ + public MLTableJobOutput() { + } + /** * Get the mode property: Output Asset Delivery Mode. * 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..6ff0f7e2b121 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,26 +16,27 @@ @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; + /** Creates an instance of ManagedIdentity class. */ + public ManagedIdentity() { + } + /** * Get the clientId property: Specifies a user-assigned identity by client ID. For system-assigned, do not set this * field. 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..7b7b3e95e5f7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The ManagedIdentityAuthTypeWorkspaceConnectionProperties model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("ManagedIdentity") +@Fluent +public final class ManagedIdentityAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionManagedIdentity credentials; + + /** Creates an instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties class. */ + public ManagedIdentityAuthTypeWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionManagedIdentity credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the ManagedIdentityAuthTypeWorkspaceConnectionProperties object itself. + */ + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCredentials( + WorkspaceConnectionManagedIdentity credentials) { + this.credentials = credentials; + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(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..41a6593e52d7 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,11 @@ @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 { + /** Creates an instance of ManagedOnlineDeployment class. */ + public ManagedOnlineDeployment() { + } + /** {@inheritDoc} */ @Override public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { @@ -57,13 +61,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..3fc7e30e4fcc 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. */ @@ -46,6 +44,10 @@ public class ManagedServiceIdentity { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of ManagedServiceIdentity class. */ + public ManagedServiceIdentity() { + } + /** * Get the principalId property: The service principal ID of the system assigned identity. This property will only * be provided for a system assigned identity. 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/MedianStoppingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java index 49a52d574f6b..786701cbc548 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java @@ -13,6 +13,10 @@ @JsonTypeName("MedianStopping") @Fluent public final class MedianStoppingPolicy extends EarlyTerminationPolicy { + /** Creates an instance of MedianStoppingPolicy class. */ + public MedianStoppingPolicy() { + } + /** {@inheritDoc} */ @Override public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { 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/ModelContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java new file mode 100644 index 000000000000..f2a5d02d7fb0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of ModelContainerProperties class. */ + public ModelContainerProperties() { + } + + /** + * Get the provisioningState property: Provisioning state for the model container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@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..cccb640d70ba 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,11 @@ public final class ModelContainerResourceArmPaginatedResult { * An array of objects of type ModelContainer. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of ModelContainerResourceArmPaginatedResult class. */ + public ModelContainerResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional @@ -52,7 +55,7 @@ public ModelContainerResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..09bf76c60a39 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, @@ -44,18 +45,6 @@ PagedIterable list( ListViewType listViewType, Context context); - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - /** * Delete container. * @@ -71,7 +60,7 @@ PagedIterable list( Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -79,9 +68,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 container. */ - ModelContainerData get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** * Get container. @@ -95,59 +83,50 @@ 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return container. */ - ModelContainerData getById(String id); + ModelContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get 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 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. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link 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. */ - ModelContainerData.DefinitionStages.Blank define(String name); + ModelContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body); } 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 70% 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..af99322cdfbf 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,16 @@ 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; + + /** Creates an instance of ModelVersionProperties class. */ + public ModelVersionProperties() { + } + /** * Get the flavors property: Mapping of model flavors to their properties. * @@ -50,9 +60,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 +80,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 +92,7 @@ public ModelVersionDetails withJobName(String jobName) { * * @return the modelType value. */ - public ModelType modelType() { + public String modelType() { return this.modelType; } @@ -90,9 +100,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 +120,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..c5a4f372df03 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,11 @@ public final class ModelVersionResourceArmPaginatedResult { * An array of objects of type ModelVersion. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of ModelVersionResourceArmPaginatedResult class. */ + public ModelVersionResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional @@ -52,7 +55,7 @@ public ModelVersionResourceArmPaginatedResult withNextLink(String nextLink) { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..87b2048dd9f8 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, @@ -61,19 +62,6 @@ PagedIterable list( ListViewType listViewType, Context context); - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - /** * Delete version. * @@ -91,7 +79,7 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String name, String version, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -100,9 +88,8 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. */ - ModelVersionData get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** * Get version. @@ -117,59 +104,58 @@ 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return version. */ - ModelVersionData getById(String id); + ModelVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get 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 version along with {@link Response}. + * @return azure Resource Manager resource envelope 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); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ModelVersionInner body, + Context context); /** - * Delete version. + * Create or update version. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link 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. + * @return azure Resource Manager resource envelope. */ - ModelVersionData.DefinitionStages.Blank define(String name); + ModelVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/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/Mpi.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java index b10ee3e5d424..3aacc74147d0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java @@ -20,6 +20,10 @@ public final class Mpi extends DistributionConfiguration { @JsonProperty(value = "processCountPerInstance") private Integer processCountPerInstance; + /** Creates an instance of Mpi class. */ + public Mpi() { + } + /** * Get the processCountPerInstance property: Number of processes per MPI node. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java index 5aa4f443b667..8613307ed6c0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java @@ -22,6 +22,10 @@ }) @Immutable public class NCrossValidations { + /** Creates an instance of NCrossValidations class. */ + public NCrossValidations() { + } + /** * Validates the instance. * 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..0831efb794b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpFixedParameters.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of NlpFixedParameters class. */ + public NlpFixedParameters() { + } + + /** + * 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..4eb747bc0be8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpParameterSubspace.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of NlpParameterSubspace class. */ + public NlpParameterSubspace() { + } + + /** + * 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..abf330155500 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpSweepSettings.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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; + + /** Creates an instance of NlpSweepSettings class. */ + public NlpSweepSettings() { + } + + /** + * 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..ea70c988c408 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,46 +6,49 @@ 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; + + /** Creates an instance of NlpVertical class. */ + public NlpVertical() { } /** @@ -68,6 +71,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 +111,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/NlpVerticalFeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java index 077a1060349a..fa5c771710db 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java @@ -9,6 +9,10 @@ /** The NlpVerticalFeaturizationSettings model. */ @Fluent public final class NlpVerticalFeaturizationSettings extends FeaturizationSettings { + /** Creates an instance of NlpVerticalFeaturizationSettings class. */ + public NlpVerticalFeaturizationSettings() { + } + /** {@inheritDoc} */ @Override public NlpVerticalFeaturizationSettings withDatasetLanguage(String datasetLanguage) { 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..f10cfb1fa479 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,16 @@ public final class NlpVerticalLimitSettings { @JsonProperty(value = "timeout") private Duration timeout; + /* + * Timeout for individual HD trials. + */ + @JsonProperty(value = "trialTimeout") + private Duration trialTimeout; + + /** Creates an instance of NlpVerticalLimitSettings class. */ + public NlpVerticalLimitSettings() { + } + /** * Get the maxConcurrentTrials property: Maximum Concurrent AutoML iterations. * @@ -49,6 +65,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 +127,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..a7004e0e8690 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,61 @@ @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; + /** Creates an instance of NodeStateCounts class. */ + public NodeStateCounts() { + } + /** - * 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 +74,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 +85,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 +96,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 +107,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 +118,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/PartialOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java similarity index 62% 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/Nodes.java index 0843c1eacbca..7dda54e50f54 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/Nodes.java @@ -9,19 +9,20 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Mutable online deployment configuration. */ +/** Abstract Nodes definition. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "endpointComputeType", - defaultImpl = PartialOnlineDeployment.class) -@JsonTypeName("PartialOnlineDeployment") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Kubernetes", value = PartialKubernetesOnlineDeployment.class), - @JsonSubTypes.Type(name = "Managed", value = PartialManagedOnlineDeployment.class) -}) + property = "nodesValueType", + defaultImpl = Nodes.class) +@JsonTypeName("Nodes") +@JsonSubTypes({@JsonSubTypes.Type(name = "All", value = AllNodes.class)}) @Immutable -public class PartialOnlineDeployment { +public class Nodes { + /** Creates an instance of Nodes class. */ + public Nodes() { + } + /** * Validates the instance. * 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..07ce4a630935 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.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.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The NoneAuthTypeWorkspaceConnectionProperties model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("None") +@Fluent +public final class NoneAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /** Creates an instance of NoneAuthTypeWorkspaceConnectionProperties class. */ + public NoneAuthTypeWorkspaceConnectionProperties() { + } + + /** {@inheritDoc} */ + @Override + public NoneAuthTypeWorkspaceConnectionProperties withCategory(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/NoneDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java index 1f3152fd5755..01b0ba236604 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java @@ -13,6 +13,10 @@ @JsonTypeName("None") @Immutable public final class NoneDatastoreCredentials extends DatastoreCredentials { + /** Creates an instance of NoneDatastoreCredentials class. */ + public NoneDatastoreCredentials() { + } + /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java index 13ca2f4c85f5..ab2aef26e6b0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java @@ -22,6 +22,10 @@ public final class NotebookPreparationError { @JsonProperty(value = "statusCode") private Integer statusCode; + /** Creates an instance of NotebookPreparationError class. */ + public NotebookPreparationError() { + } + /** * Get the errorMessage property: The errorMessage property. * 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/Objective.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java index 2edf9faeb460..bd09112175ac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java @@ -23,6 +23,10 @@ public final class Objective { @JsonProperty(value = "primaryMetric", required = true) private String primaryMetric; + /** Creates an instance of Objective class. */ + public Objective() { + } + /** * Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning. * 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..2a4d9145dae6 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,28 +294,28 @@ 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. * * @param body The request containing parameters for retrieving logs. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ - DeploymentLogs getLogs(DeploymentLogsRequest body); + Response getLogsWithResponse(DeploymentLogsRequest body, Context context); /** * Polls an Endpoint operation. * * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ - Response getLogsWithResponse(DeploymentLogsRequest body, Context context); + DeploymentLogs getLogs(DeploymentLogsRequest body); } 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..fff47cc6a83f 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,13 +82,16 @@ 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") private OnlineScaleSettings scaleSettings; + /** Creates an instance of OnlineDeploymentProperties class. */ + public OnlineDeploymentProperties() { + } + /** * Get the appInsightsEnabled property: If true, enables Application Insights logging. * @@ -110,9 +105,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 +127,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 +148,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 +168,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 +188,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 +208,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 +239,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 +259,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 +283,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..b9915874b1ca 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,11 @@ public final class OnlineDeploymentTrackedResourceArmPaginatedResult { * An array of objects of type OnlineDeployment. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of OnlineDeploymentTrackedResourceArmPaginatedResult class. */ + public OnlineDeploymentTrackedResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no @@ -52,7 +55,7 @@ public OnlineDeploymentTrackedResourceArmPaginatedResult withNextLink(String nex * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..4e07db5be0f8 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, @@ -82,13 +82,14 @@ void delete( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment. + * @return inference Deployment Deployment along with {@link Response}. */ - OnlineDeploymentData get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); /** * Get Inference Deployment Deployment. @@ -97,14 +98,12 @@ OnlineDeploymentData get( * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. + * @return inference Deployment Deployment. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** * Polls an Endpoint operation. @@ -114,17 +113,19 @@ Response getWithResponse( * @param endpointName Inference endpoint name. * @param deploymentName The name and identifier for the endpoint. * @param body The request containing parameters for retrieving logs. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ - DeploymentLogs getLogs( + Response getLogsWithResponse( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - DeploymentLogsRequest body); + DeploymentLogsRequest body, + Context context); /** * Polls an Endpoint operation. @@ -134,19 +135,17 @@ DeploymentLogs getLogs( * @param endpointName Inference endpoint name. * @param deploymentName The name and identifier for the endpoint. * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ - Response getLogsWithResponse( + DeploymentLogs getLogs( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - DeploymentLogsRequest body, - Context context); + DeploymentLogsRequest body); /** * List Inference Endpoint Deployment Skus. @@ -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..45e3b1948649 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,27 +293,27 @@ 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. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ - EndpointAuthKeys listKeys(); + Response listKeysWithResponse(Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. + * @return keys for endpoint authentication. */ - Response listKeysWithResponse(Context context); + EndpointAuthKeys listKeys(); /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). @@ -376,20 +339,20 @@ interface WithSku { /** * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token. + * @return service Token along with {@link Response}. */ - EndpointAuthToken getToken(); + Response getTokenWithResponse(Context context); /** * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token along with {@link Response}. + * @return service Token. */ - Response getTokenWithResponse(Context context); + EndpointAuthToken getToken(); } 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 79% 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..f7896495dfc9 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,20 +36,22 @@ 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) private Map traffic; + /** Creates an instance of OnlineEndpointProperties class. */ + public OnlineEndpointProperties() { + } + /** * Get the compute property: ARM resource ID of the compute if it exists. optional. * @@ -63,9 +65,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 +87,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 +118,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 +140,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..d675ed3a4464 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,11 @@ public final class OnlineEndpointTrackedResourceArmPaginatedResult { * An array of objects of type OnlineEndpoint. */ @JsonProperty(value = "value") - private List value; + private List value; + + /** Creates an instance of OnlineEndpointTrackedResourceArmPaginatedResult class. */ + public OnlineEndpointTrackedResourceArmPaginatedResult() { + } /** * Get the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional @@ -52,7 +55,7 @@ public OnlineEndpointTrackedResourceArmPaginatedResult withNextLink(String nextL * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -62,7 +65,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..44e3dd0a8069 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, @@ -85,12 +85,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint. + * @return online Endpoint along with {@link Response}. */ - OnlineEndpointData get(String resourceGroupName, String workspaceName, String endpointName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * Get Online Endpoint. @@ -98,14 +100,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. + * @return online Endpoint. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. @@ -113,12 +113,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ - EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); + Response listKeysWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. @@ -126,14 +128,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. + * @return keys for endpoint authentication. */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). @@ -174,12 +174,14 @@ void regenerateKeys( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token. + * @return service Token along with {@link Response}. */ - EndpointAuthToken getToken(String resourceGroupName, String workspaceName, String endpointName); + Response getTokenWithResponse( + String resourceGroupName, String workspaceName, String endpointName, Context context); /** * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. @@ -187,14 +189,12 @@ void regenerateKeys( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token along with {@link Response}. + * @return service Token. */ - Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + EndpointAuthToken getToken(String resourceGroupName, String workspaceName, String endpointName); /** * Get Online Endpoint. @@ -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..a6f6c9d9ee8d 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") @@ -33,6 +31,10 @@ public final class OnlineRequestSettings { @JsonProperty(value = "requestTimeout") private Duration requestTimeout; + /** Creates an instance of OnlineRequestSettings class. */ + public OnlineRequestSettings() { + } + /** * Get the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed per * deployment. Defaults to 1. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java index 60334eea6b62..e8acef559320 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java @@ -22,6 +22,10 @@ }) @Immutable public class OnlineScaleSettings { + /** Creates an instance of OnlineScaleSettings class. */ + public OnlineScaleSettings() { + } + /** * Validates the instance. * 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; + /** Creates an instance of PaginatedComputeResourcesList class. */ + public PaginatedComputeResourcesList() { + } + /** * Get the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedWorkspaceConnectionsList.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedWorkspaceConnectionsList.java deleted file mode 100644 index 91bcd2c2cfd8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedWorkspaceConnectionsList.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Paginated list of Workspace connection objects. */ -@Fluent -public final class PaginatedWorkspaceConnectionsList { - /* - * An array of Workspace connection objects. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A continuation link (absolute URI) to the next page of results in the - * list. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: An array of Workspace connection objects. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of Workspace connection objects. - * - * @param value the value value to set. - * @return the PaginatedWorkspaceConnectionsList object itself. - */ - public PaginatedWorkspaceConnectionsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @param nextLink the nextLink value to set. - * @return the PaginatedWorkspaceConnectionsList object itself. - */ - public PaginatedWorkspaceConnectionsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java index 7f3588eac7d4..0be11f6793e1 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,148 +5,19 @@ 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; + /** Creates an instance of PartialBatchDeployment class. */ + public PartialBatchDeployment() { } /** @@ -169,248 +40,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..aaef56977330 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public final class PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties") + private PartialBatchDeployment properties; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties class. */ + public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() { + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public PartialBatchDeployment properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties object itself. + */ + public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties withProperties( + PartialBatchDeployment properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties object itself. + */ + public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/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..1939e23433ba 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. */ @@ -30,6 +28,10 @@ public class PartialManagedServiceIdentity { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of PartialManagedServiceIdentity class. */ + public PartialManagedServiceIdentity() { + } + /** * Get the type property: Managed service identity (system assigned and/or user assigned identities). * 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..81b9958b58d1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public class PartialMinimalTrackedResource { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of PartialMinimalTrackedResource class. */ + public PartialMinimalTrackedResource() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PartialMinimalTrackedResource object itself. + */ + public PartialMinimalTrackedResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java new file mode 100644 index 000000000000..7187063fa6cc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public class PartialMinimalTrackedResourceWithIdentity extends PartialMinimalTrackedResource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private PartialManagedServiceIdentity identity; + + /** Creates an instance of PartialMinimalTrackedResourceWithIdentity class. */ + public PartialMinimalTrackedResourceWithIdentity() { + } + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public PartialManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @param identity the identity value to set. + * @return the PartialMinimalTrackedResourceWithIdentity object itself. + */ + public PartialMinimalTrackedResourceWithIdentity withIdentity(PartialManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialMinimalTrackedResourceWithIdentity withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java new file mode 100644 index 000000000000..fd014366f411 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public final class PartialMinimalTrackedResourceWithSku extends PartialMinimalTrackedResource { + /* + * Sku details required for ARM contract for Autoscaling. + */ + @JsonProperty(value = "sku") + private PartialSku sku; + + /** Creates an instance of PartialMinimalTrackedResourceWithSku class. */ + public PartialMinimalTrackedResourceWithSku() { + } + + /** + * Get the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + public PartialSku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku details required for ARM contract for Autoscaling. + * + * @param sku the sku value to set. + * @return the PartialMinimalTrackedResourceWithSku object itself. + */ + public PartialMinimalTrackedResourceWithSku withSku(PartialSku sku) { + this.sku = sku; + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialMinimalTrackedResourceWithSku withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/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..3c64014d3ee5 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. @@ -51,6 +43,10 @@ public final class PartialBatchEndpointPartialTrackedResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of PartialRegistryPartialTrackedResource class. */ + public PartialRegistryPartialTrackedResource() { + } + /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * @@ -64,9 +60,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 +82,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 +102,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 +122,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 +142,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 +158,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..a5220a7d8207 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,19 +30,23 @@ 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; + /** Creates an instance of PartialSku class. */ + public PartialSku() { + } + /** * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If * scale out/in is not possible for the resource this may be omitted. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java index 952af68a607b..2b2e387338f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java @@ -22,6 +22,10 @@ public final class Password { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private String value; + /** Creates an instance of Password class. */ + public Password() { + } + /** * Get the name property: The name property. * 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..d4665991c112 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The PatAuthTypeWorkspaceConnectionProperties model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("PAT") +@Fluent +public final class PatAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionPersonalAccessToken credentials; + + /** Creates an instance of PatAuthTypeWorkspaceConnectionProperties class. */ + public PatAuthTypeWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionPersonalAccessToken credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the PatAuthTypeWorkspaceConnectionProperties object itself. + */ + public PatAuthTypeWorkspaceConnectionProperties withCredentials( + WorkspaceConnectionPersonalAccessToken credentials) { + this.credentials = credentials; + return this; + } + + /** {@inheritDoc} */ + @Override + public PatAuthTypeWorkspaceConnectionProperties withCategory(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/PersonalComputeInstanceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java index 79a851afd6f1..acf0346afd9d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java @@ -16,6 +16,10 @@ public final class PersonalComputeInstanceSettings { @JsonProperty(value = "assignedUser") private AssignedUser assignedUser; + /** Creates an instance of PersonalComputeInstanceSettings class. */ + public PersonalComputeInstanceSettings() { + } + /** * Get the assignedUser property: A user explicitly assigned to a personal compute instance. * 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..38dd2499a528 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,16 @@ public final class PipelineJob extends JobBaseDetails { @JsonProperty(value = "settings") private Object settings; + /* + * ARM resource ID of source job. + */ + @JsonProperty(value = "sourceJobId") + private String sourceJobId; + + /** Creates an instance of PipelineJob class. */ + public PipelineJob() { + } + /** * Get the inputs property: Inputs for the pipeline job. * @@ -123,6 +133,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 +195,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/PrivateEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java index 29c72d9d75d6..7d3cdfb6741b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java @@ -22,6 +22,10 @@ public final class PrivateEndpoint { @JsonProperty(value = "subnetArmId", access = JsonProperty.Access.WRITE_ONLY) private String subnetArmId; + /** Creates an instance of PrivateEndpoint class. */ + public PrivateEndpoint() { + } + /** * Get the id property: The ARM identifier for Private Endpoint. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java index 70d40c80d876..b6f3c0c8b9b1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java @@ -18,6 +18,10 @@ public final class PrivateEndpointConnectionListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of PrivateEndpointConnectionListResult class. */ + public PrivateEndpointConnectionListResult() { + } + /** * Get the value property: Array of private endpoint connections. * 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/PrivateEndpointConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java index a50a2b135afd..c660b6ad5ca1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java @@ -43,12 +43,14 @@ public interface PrivateEndpointConnections { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. + * @return the specified private endpoint connection associated with the workspace along with {@link Response}. */ - PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** * Gets the specified private endpoint connection associated with the workspace. @@ -56,14 +58,12 @@ public interface PrivateEndpointConnections { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the specified private endpoint connection associated with the workspace. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the workspace. @@ -71,11 +71,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** * Deletes the specified private endpoint connection associated with the workspace. @@ -83,14 +86,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** * Gets the specified private endpoint connection associated with the workspace. 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..a98acd180051 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,12 +48,15 @@ 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; + /** Creates an instance of PrivateLinkResource class. */ + public PrivateLinkResource() { + } + /** * Get the innerProperties property: Resource properties. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java index aeeb3e4a95cc..76dbb0e8e76e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java @@ -14,24 +14,24 @@ public interface PrivateLinkResources { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. + * @return the private link resources that need to be created for a workspace along with {@link Response}. */ - PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets the private link resources that need to be created for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response}. + * @return the private link resources that need to be created for a workspace. */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java index 874e638188c9..bd4774e9026c 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,12 +23,15 @@ 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; + /** Creates an instance of PrivateLinkServiceConnectionState class. */ + public PrivateLinkServiceConnectionState() { + } + /** * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the * service. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java index 46d088fc354e..3827d5bdb206 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java @@ -41,6 +41,10 @@ public final class ProbeSettings { @JsonProperty(value = "timeout") private Duration timeout; + /** Creates an instance of ProbeSettings class. */ + public ProbeSettings() { + } + /** * Get the failureThreshold property: The number of failures to allow before returning an unhealthy status. * 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..eaec71041991 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProgressMetrics.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.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; + + /** Creates an instance of ProgressMetrics class. */ + public ProgressMetrics() { + } + + /** + * 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/PyTorch.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java index cd93cc1f1149..c172265d0b92 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java @@ -20,6 +20,10 @@ public final class PyTorch extends DistributionConfiguration { @JsonProperty(value = "processCountPerInstance") private Integer processCountPerInstance; + /** Creates an instance of PyTorch class. */ + public PyTorch() { + } + /** * Get the processCountPerInstance property: Number of processes per node. * 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..3a3c3836c068 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; @@ -34,6 +36,10 @@ public final class QuotaBaseProperties { @JsonProperty(value = "unit") private QuotaUnit unit; + /** Creates an instance of QuotaBaseProperties class. */ + public QuotaBaseProperties() { + } + /** * Get the id property: Specifies the resource ID. * @@ -75,7 +81,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 +92,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/QuotaUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java index b51aee573312..38d413ef636e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java @@ -23,6 +23,10 @@ public final class QuotaUpdateParameters { @JsonProperty(value = "location") private String location; + /** Creates an instance of QuotaUpdateParameters class. */ + public QuotaUpdateParameters() { + } + /** * Get the value property: The list for update quota. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java index 1d770d983570..aa2c3e0fc411 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java @@ -15,26 +15,26 @@ public interface Quotas { * * @param location The location for update quota is queried. * @param parameters Quota update parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. + * @return the result of update workspace quota along with {@link Response}. */ - UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters); + Response updateWithResponse( + String location, QuotaUpdateParameters parameters, Context context); /** * Update quota for each VM family in workspace. * * @param location The location for update quota is queried. * @param parameters Quota update parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response}. + * @return the result of update workspace quota. */ - Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context); + UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters); /** * Gets the currently assigned Workspace Quotas based on VMFamily. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java index c4f935212e22..cdb0b372a244 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java @@ -26,6 +26,10 @@ public final class RandomSamplingAlgorithm extends SamplingAlgorithm { @JsonProperty(value = "seed") private Integer seed; + /** Creates an instance of RandomSamplingAlgorithm class. */ + public RandomSamplingAlgorithm() { + } + /** * Get the rule property: The specific type of random algorithm. * 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..9eb5125659d0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of Recurrence class. */ + public Recurrence() { + } + + /** + * 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..519561c59993 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,116 @@ 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; + + /** Creates an instance of RecurrenceSchedule class. */ + public RecurrenceSchedule() { + } /** - * 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); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withScheduleStatus(ScheduleStatus scheduleStatus) { - super.withScheduleStatus(scheduleStatus); + public RecurrenceSchedule withMonthDays(List monthDays) { + this.monthDays = monthDays; 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 +125,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..8937548c5ba4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The RecurrenceTrigger model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType") +@JsonTypeName("Recurrence") +@Fluent +public final class RecurrenceTrigger extends TriggerBase { + /* + * [Required] The frequency to trigger schedule. + */ + @JsonProperty(value = "frequency", required = true) + private RecurrenceFrequency frequency; + + /* + * [Required] Specifies schedule interval in conjunction with frequency + */ + @JsonProperty(value = "interval", required = true) + private int interval; + + /* + * The recurrence schedule. + */ + @JsonProperty(value = "schedule") + private RecurrenceSchedule schedule; + + /** Creates an instance of RecurrenceTrigger class. */ + public RecurrenceTrigger() { + } + + /** + * Get the frequency property: [Required] The frequency to trigger schedule. + * + * @return the frequency value. + */ + public RecurrenceFrequency frequency() { + return this.frequency; + } + + /** + * Set the frequency property: [Required] The frequency to trigger schedule. + * + * @param frequency the frequency value to set. + * @return the RecurrenceTrigger object itself. + */ + public RecurrenceTrigger withFrequency(RecurrenceFrequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * + * @return the interval value. + */ + public int interval() { + return this.interval; + } + + /** + * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * + * @param interval the interval value to set. + * @return the RecurrenceTrigger object itself. + */ + public RecurrenceTrigger withInterval(int interval) { + this.interval = interval; + return this; + } + + /** + * Get the schedule property: The recurrence schedule. + * + * @return the schedule value. + */ + public RecurrenceSchedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: The recurrence schedule. + * + * @param schedule the schedule value to set. + * @return the RecurrenceTrigger object itself. + */ + public RecurrenceTrigger withSchedule(RecurrenceSchedule schedule) { + this.schedule = schedule; + return this; + } + + /** {@inheritDoc} */ + @Override + public RecurrenceTrigger withEndTime(String endTime) { + super.withEndTime(endTime); + return this; + } + + /** {@inheritDoc} */ + @Override + public RecurrenceTrigger withStartTime(String startTime) { + super.withStartTime(startTime); + return this; + } + + /** {@inheritDoc} */ + @Override + public RecurrenceTrigger withTimeZone(String timeZone) { + super.withTimeZone(timeZone); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (frequency() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property frequency in model RecurrenceTrigger")); + } + if (schedule() != null) { + schedule().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RecurrenceTrigger.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java 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..637b34d4e5ac 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; @@ -24,6 +23,10 @@ public final class RegenerateEndpointKeysRequest { @JsonProperty(value = "keyValue") private String keyValue; + /** Creates an instance of RegenerateEndpointKeysRequest class. */ + public RegenerateEndpointKeysRequest() { + } + /** * Get the keyType property: [Required] Specification for which type of key to generate. Primary or Secondary. * 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..f49d4e2ddbe3 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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 deleteByResourceGroupWithResponse(String resourceGroupName, String registryName, Context context); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of 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); + + /** + * 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 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 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..a75997d618ff --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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 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..1953b0809623 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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 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..2dab6a39e255 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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 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..b048d2cccb17 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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 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..9f5183aa3c02 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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 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..3e2b74488f7b --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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 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/RegistryListCredentialsResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java index 8ccf2b521000..ada32c54e2e1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java @@ -29,6 +29,10 @@ public final class RegistryListCredentialsResult { @JsonProperty(value = "passwords") private List passwords; + /** Creates an instance of RegistryListCredentialsResult class. */ + public RegistryListCredentialsResult() { + } + /** * Get the location property: The location property. * 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..298447a4bd75 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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 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..f50489f49f09 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. + * @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 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..18440950ded3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryProperties.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of RegistryProperties class. */ + public RegistryProperties() { + } + + /** + * 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..3be9195b2715 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.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.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; + + /** Creates an instance of RegistryRegionArmDetails class. */ + public RegistryRegionArmDetails() { + } + + /** + * Get the acrDetails property: List of ACR accounts. + * + * @return the acrDetails value. + */ + public List acrDetails() { + return this.acrDetails; + } + + /** + * Set the acrDetails property: List of ACR accounts. + * + * @param acrDetails the acrDetails value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withAcrDetails(List acrDetails) { + this.acrDetails = acrDetails; + return this; + } + + /** + * Get the location property: The location where the registry exists. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location where the registry exists. + * + * @param location the location value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the storageAccountDetails property: List of storage accounts. + * + * @return the storageAccountDetails value. + */ + public List storageAccountDetails() { + return this.storageAccountDetails; + } + + /** + * Set the storageAccountDetails property: List of storage accounts. + * + * @param storageAccountDetails the storageAccountDetails value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withStorageAccountDetails(List storageAccountDetails) { + this.storageAccountDetails = storageAccountDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (acrDetails() != null) { + acrDetails().forEach(e -> e.validate()); + } + if (storageAccountDetails() != null) { + storageAccountDetails().forEach(e -> e.validate()); + } + } +} 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..a37b57eb6d41 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.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.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; + + /** Creates an instance of RegistryTrackedResourceArmPaginatedResult class. */ + public RegistryTrackedResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the RegistryTrackedResourceArmPaginatedResult object itself. + */ + public RegistryTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type Registry. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type Registry. + * + * @param value the value value to set. + * @return the RegistryTrackedResourceArmPaginatedResult object itself. + */ + public RegistryTrackedResourceArmPaginatedResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} 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..451b66c605f2 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,49 +52,61 @@ 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; + + /** Creates an instance of Regression class. */ + public Regression() { } /** @@ -118,22 +130,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 +189,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 +230,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 +406,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 +428,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..289a03ff5640 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; +import java.util.List; + +/** Regression Training related configuration. */ +@Fluent +public final class RegressionTrainingSettings extends TrainingSettings { + /* + * Allowed models for regression task. + */ + @JsonProperty(value = "allowedTrainingAlgorithms") + private List allowedTrainingAlgorithms; + + /* + * Blocked models for regression task. + */ + @JsonProperty(value = "blockedTrainingAlgorithms") + private List blockedTrainingAlgorithms; + + /** Creates an instance of RegressionTrainingSettings class. */ + public RegressionTrainingSettings() { + } + + /** + * Get the allowedTrainingAlgorithms property: Allowed models for regression task. + * + * @return the allowedTrainingAlgorithms value. + */ + public List allowedTrainingAlgorithms() { + return this.allowedTrainingAlgorithms; + } + + /** + * Set the allowedTrainingAlgorithms property: Allowed models for regression task. + * + * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. + * @return the RegressionTrainingSettings object itself. + */ + public RegressionTrainingSettings withAllowedTrainingAlgorithms(List allowedTrainingAlgorithms) { + this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; + return this; + } + + /** + * Get the blockedTrainingAlgorithms property: Blocked models for regression task. + * + * @return the blockedTrainingAlgorithms value. + */ + public List blockedTrainingAlgorithms() { + return this.blockedTrainingAlgorithms; + } + + /** + * Set the blockedTrainingAlgorithms property: Blocked models for regression task. + * + * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. + * @return the RegressionTrainingSettings object itself. + */ + public RegressionTrainingSettings withBlockedTrainingAlgorithms(List blockedTrainingAlgorithms) { + this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; + return this; + } + + /** {@inheritDoc} */ + @Override + public RegressionTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + super.withEnableDnnTraining(enableDnnTraining); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegressionTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + super.withEnableModelExplainability(enableModelExplainability); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegressionTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegressionTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { + super.withEnableStackEnsemble(enableStackEnsemble); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegressionTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { + super.withEnableVoteEnsemble(enableVoteEnsemble); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegressionTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { + super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegressionTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + super.withStackEnsembleSettings(stackEnsembleSettings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java 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/ResourceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java index 70d85519553d..4d9b1502f311 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java @@ -32,6 +32,10 @@ public class ResourceBase { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of ResourceBase class. */ + public ResourceBase() { + } + /** * Get the description property: The asset description text. * 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..01067c5f7380 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. */ @@ -31,6 +31,10 @@ public final class ResourceConfiguration { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; + /** Creates an instance of ResourceConfiguration class. */ + public ResourceConfiguration() { + } + /** * Get the instanceCount property: Optional number of instances or nodes used by the compute target. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java index 32afa0de3b45..a5cc276054e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java @@ -17,6 +17,10 @@ public final class ResourceId { @JsonProperty(value = "id", required = true) private String id; + /** Creates an instance of ResourceId class. */ + public ResourceId() { + } + /** * Get the id property: The ID of the resource. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java index 9071301bdc35..9824d46b6678 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java @@ -22,6 +22,10 @@ public final class ResourceName { @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) private String localizedValue; + /** Creates an instance of ResourceName class. */ + public ResourceName() { + } + /** * Get the value property: The name of the resource. * 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/Route.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java index 19a2b1f5f635..ce8860e8900b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java @@ -23,6 +23,10 @@ public final class Route { @JsonProperty(value = "port", required = true) private int port; + /** Creates an instance of Route class. */ + public Route() { + } + /** * Get the path property: [Required] The path for the route. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java index 0a123f35bc48..1a96ee37626e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java @@ -23,6 +23,10 @@ }) @Immutable public class SamplingAlgorithm { + /** Creates an instance of SamplingAlgorithm class. */ + public SamplingAlgorithm() { + } + /** * Validates the instance. * 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..5a2e80c7be3a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The SasAuthTypeWorkspaceConnectionProperties model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("SAS") +@Fluent +public final class SasAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionSharedAccessSignature credentials; + + /** Creates an instance of SasAuthTypeWorkspaceConnectionProperties class. */ + public SasAuthTypeWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionSharedAccessSignature credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the SasAuthTypeWorkspaceConnectionProperties object itself. + */ + public SasAuthTypeWorkspaceConnectionProperties withCredentials( + WorkspaceConnectionSharedAccessSignature credentials) { + this.credentials = credentials; + return this; + } + + /** {@inheritDoc} */ + @Override + public SasAuthTypeWorkspaceConnectionProperties withCategory(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/SasDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java index 0aa3c83cbbaa..81edf1559396 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java @@ -21,6 +21,10 @@ public final class SasDatastoreCredentials extends DatastoreCredentials { @JsonProperty(value = "secrets", required = true) private SasDatastoreSecrets secrets; + /** Creates an instance of SasDatastoreCredentials class. */ + public SasDatastoreCredentials() { + } + /** * Get the secrets property: [Required] Storage container secrets. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java index 027155570836..dbeda80d6e30 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java @@ -21,6 +21,10 @@ public final class SasDatastoreSecrets extends DatastoreSecretsInner { @JsonProperty(value = "sasToken") private String sasToken; + /** Creates an instance of SasDatastoreSecrets class. */ + public SasDatastoreSecrets() { + } + /** * Get the sasToken property: Storage container SAS token. * 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..efd70e8605e1 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,12 +24,15 @@ 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; + /** Creates an instance of ScaleSettings class. */ + public ScaleSettings() { + } + /** * Get the maxNodeCount property: Max number of nodes to use. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java index 96bab4750029..f5282e103e15 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java @@ -16,6 +16,10 @@ public final class ScaleSettingsInformation { @JsonProperty(value = "scaleSettings") private ScaleSettings scaleSettings; + /** Creates an instance of ScaleSettingsInformation class. */ + public ScaleSettingsInformation() { + } + /** * Get the scaleSettings property: scale settings for AML Compute. * 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/PartialAssetReferenceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.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/ScheduleActionBase.java index 030c087c98c9..d88932a1d1c2 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/ScheduleActionBase.java @@ -9,20 +9,23 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base definition for asset references. */ +/** The ScheduleActionBase model. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "referenceType", - defaultImpl = PartialAssetReferenceBase.class) -@JsonTypeName("PartialAssetReferenceBase") + property = "actionType", + defaultImpl = ScheduleActionBase.class) +@JsonTypeName("ScheduleActionBase") @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 = "InvokeBatchEndpoint", value = EndpointScheduleAction.class), + @JsonSubTypes.Type(name = "CreateJob", value = JobScheduleAction.class) }) @Immutable -public class PartialAssetReferenceBase { +public class ScheduleActionBase { + /** Creates an instance of ScheduleActionBase class. */ + public ScheduleActionBase() { + } + /** * Validates the instance. * 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..dfff85753766 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,89 @@ 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; + @JsonProperty(value = "status") + private ScheduleStatus status; - /* - * 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; + /** Creates an instance of ScheduleBase class. */ + public ScheduleBase() { } /** - * 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..2e486abeab37 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Base definition of a schedule. */ +@Fluent +public final class ScheduleProperties extends ResourceBase { + /* + * [Required] Specifies the action of the schedule + */ + @JsonProperty(value = "action", required = true) + private ScheduleActionBase action; + + /* + * Display name of schedule. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Is the schedule enabled? + */ + @JsonProperty(value = "isEnabled") + private Boolean isEnabled; + + /* + * Provisioning state for the schedule. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ScheduleProvisioningStatus provisioningState; + + /* + * [Required] Specifies the trigger details + */ + @JsonProperty(value = "trigger", required = true) + private TriggerBase trigger; + + /** Creates an instance of ScheduleProperties class. */ + public ScheduleProperties() { + } + + /** + * Get the action property: [Required] Specifies the action of the schedule. + * + * @return the action value. + */ + public ScheduleActionBase action() { + return this.action; + } + + /** + * Set the action property: [Required] Specifies the action of the schedule. + * + * @param action the action value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withAction(ScheduleActionBase action) { + this.action = action; + return this; + } + + /** + * Get the displayName property: Display name of schedule. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of schedule. + * + * @param displayName the displayName value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the isEnabled property: Is the schedule enabled?. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Set the isEnabled property: Is the schedule enabled?. + * + * @param isEnabled the isEnabled value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the schedule. + * + * @return the provisioningState value. + */ + public ScheduleProvisioningStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the trigger property: [Required] Specifies the trigger details. + * + * @return the trigger value. + */ + public TriggerBase trigger() { + return this.trigger; + } + + /** + * Set the trigger property: [Required] Specifies the trigger details. + * + * @param trigger the trigger value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withTrigger(TriggerBase trigger) { + this.trigger = trigger; + return this; + } + + /** {@inheritDoc} */ + @Override + public ScheduleProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public ScheduleProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public ScheduleProperties withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (action() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property action in model ScheduleProperties")); + } else { + action().validate(); + } + if (trigger() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property trigger in model ScheduleProperties")); + } else { + trigger().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduleProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java 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/ScheduleResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java new file mode 100644 index 000000000000..b43e188d1ab2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.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.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of Schedule entities. */ +@Fluent +public final class ScheduleResourceArmPaginatedResult { + /* + * The link to the next page of Schedule objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type Schedule. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of ScheduleResourceArmPaginatedResult class. */ + public ScheduleResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the ScheduleResourceArmPaginatedResult object itself. + */ + public ScheduleResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type Schedule. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type Schedule. + * + * @param value the value value to set. + * @return the ScheduleResourceArmPaginatedResult object itself. + */ + public ScheduleResourceArmPaginatedResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java 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..19f7f8683828 --- /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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schedule along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get schedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schedule. + */ + Schedule get(String resourceGroupName, String workspaceName, String name); + + /** + * Get schedule. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schedule along with {@link Response}. + */ + Schedule getById(String id); + + /** + * Get schedule. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schedule along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete schedule. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete schedule. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Schedule resource. + * + * @param name resource name. + * @return the first stage of the new Schedule definition. + */ + Schedule.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java index 2fb97c2ac2d4..8c7ad3d4aa8a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java @@ -11,7 +11,7 @@ @Fluent public final class ScriptReference { /* - * The storage source of the script: inline, workspace. + * The storage source of the script: workspace. */ @JsonProperty(value = "scriptSource") private String scriptSource; @@ -34,8 +34,12 @@ public final class ScriptReference { @JsonProperty(value = "timeout") private String timeout; + /** Creates an instance of ScriptReference class. */ + public ScriptReference() { + } + /** - * Get the scriptSource property: The storage source of the script: inline, workspace. + * Get the scriptSource property: The storage source of the script: workspace. * * @return the scriptSource value. */ @@ -44,7 +48,7 @@ public String scriptSource() { } /** - * Set the scriptSource property: The storage source of the script: inline, workspace. + * Set the scriptSource property: The storage source of the script: workspace. * * @param scriptSource the scriptSource value to set. * @return the ScriptReference object itself. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java index 5d4c3ca95345..5dfd1557e247 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java @@ -22,6 +22,10 @@ public final class ScriptsToExecute { @JsonProperty(value = "creationScript") private ScriptReference creationScript; + /** Creates an instance of ScriptsToExecute class. */ + public ScriptsToExecute() { + } + /** * Get the startupScript property: Script that's run every time the machine starts. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java index 492ad5302809..ecb9dc616a66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java @@ -22,6 +22,10 @@ }) @Immutable public class Seasonality { + /** Creates an instance of Seasonality class. */ + public Seasonality() { + } + /** * Validates the instance. * 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/ServiceManagedResourcesSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java index 1438abd31424..aceabf00a371 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java @@ -16,6 +16,10 @@ public final class ServiceManagedResourcesSettings { @JsonProperty(value = "cosmosDb") private CosmosDbSettings cosmosDb; + /** Creates an instance of ServiceManagedResourcesSettings class. */ + public ServiceManagedResourcesSettings() { + } + /** * Get the cosmosDb property: The settings for the service managed cosmosdb account. * 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..0241dc40358e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties class. */ + public ServicePrincipalAuthTypeWorkspaceConnectionProperties() { + } + + /** + * 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/ServicePrincipalDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java index 0bec235e2fe7..f8898ec7e744 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java @@ -46,6 +46,10 @@ public final class ServicePrincipalDatastoreCredentials extends DatastoreCredent @JsonProperty(value = "tenantId", required = true) private UUID tenantId; + /** Creates an instance of ServicePrincipalDatastoreCredentials class. */ + public ServicePrincipalDatastoreCredentials() { + } + /** * Get the authorityUrl property: Authority URL used for authentication. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java index b3d9db3a1bf1..8b4dcd3f879a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java @@ -21,6 +21,10 @@ public final class ServicePrincipalDatastoreSecrets extends DatastoreSecretsInne @JsonProperty(value = "clientSecret") private String clientSecret; + /** Creates an instance of ServicePrincipalDatastoreSecrets class. */ + public ServicePrincipalDatastoreSecrets() { + } + /** * Get the clientSecret property: Service principal secret. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java index e91fb7fa8ad3..761f98594eea 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java @@ -16,6 +16,10 @@ public final class SetupScripts { @JsonProperty(value = "scripts") private ScriptsToExecute scripts; + /** Creates an instance of SetupScripts class. */ + public SetupScripts() { + } + /** * Get the scripts property: Customized setup scripts. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java index ad54f8d39f4c..46ec2f251384 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java @@ -23,6 +23,10 @@ public final class SharedPrivateLinkResource { @JsonProperty(value = "properties") private SharedPrivateLinkResourceProperty innerProperties; + /** Creates an instance of SharedPrivateLinkResource class. */ + public SharedPrivateLinkResource() { + } + /** * Get the name property: Unique name of the private link. * 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..81a4a2701f80 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,34 +18,36 @@ 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; + /** Creates an instance of Sku class. */ + public Sku() { + } + /** * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java index 6de4a3d9612a..4948ce477871 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java @@ -34,6 +34,10 @@ public final class SkuCapacity { @JsonProperty(value = "scaleType") private SkuScaleType scaleType; + /** Creates an instance of SkuCapacity class. */ + public SkuCapacity() { + } + /** * Get the defaultProperty property: Gets or sets the default 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..33f198f1dfb7 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; @@ -25,6 +24,10 @@ public final class SkuResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of SkuResourceArmPaginatedResult class. */ + public SkuResourceArmPaginatedResult() { + } + /** * Get the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional * pages. 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..ab0554e10763 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,19 +12,22 @@ @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; + /** Creates an instance of SkuSetting class. */ + public SkuSetting() { + } + /** * Get the name property: [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. * 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..84cf8c51e3f2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java @@ -0,0 +1,455 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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; + + /** Creates an instance of SparkJob class. */ + public SparkJob() { + } + + /** + * 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..e90affce3151 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.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.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 { + /** Creates an instance of SparkJobEntry class. */ + public 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..b0ef4d88bd19 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.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 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; + + /** Creates an instance of SparkJobPythonEntry class. */ + public SparkJobPythonEntry() { + } + + /** + * 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..f05cabc80e9a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.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 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; + + /** Creates an instance of SparkJobScalaEntry class. */ + public SparkJobScalaEntry() { + } + + /** + * 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..eb617f69665f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of SparkResourceConfiguration class. */ + public SparkResourceConfiguration() { + } + + /** + * Get the instanceType property: Optional type of VM used as supported by the compute target. + * + * @return the instanceType value. + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the instanceType property: Optional type of VM used as supported by the compute target. + * + * @param instanceType the instanceType value to set. + * @return the SparkResourceConfiguration object itself. + */ + public SparkResourceConfiguration withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + + /** + * Get the runtimeVersion property: Version of spark runtime used for the job. + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: Version of spark runtime used for the job. + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the SparkResourceConfiguration object itself. + */ + public SparkResourceConfiguration withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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..894cce612693 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 @@ -46,12 +46,16 @@ public final class SslConfiguration { @JsonProperty(value = "overwriteExistingDomain") private Boolean overwriteExistingDomain; + /** Creates an instance of SslConfiguration class. */ + public SslConfiguration() { + } + /** * Get the status property: Enable or disable ssl for scoring. * * @return the status value. */ - public SslConfigurationStatus status() { + public SslConfigStatus status() { return this.status; } @@ -61,7 +65,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..d0081827f033 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,20 +17,22 @@ 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; + /** Creates an instance of StackEnsembleSettings class. */ + public StackEnsembleSettings() { + } + /** * Get the stackMetaLearnerKWargs property: Optional parameters to pass to the initializer of the meta-learner. * 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..39fdda55d12d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessage.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.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; + + /** Creates an instance of StatusMessage class. */ + public StatusMessage() { + } + + /** + * 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..06d3ea89bd47 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.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; + +/** 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; + + /** Creates an instance of StorageAccountDetails class. */ + public StorageAccountDetails() { + } + + /** + * 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..0a72071e3d48 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; @@ -69,6 +68,10 @@ public final class SweepJob extends JobBaseDetails { @JsonProperty(value = "trial", required = true) private TrialComponent trial; + /** Creates an instance of SweepJob class. */ + public SweepJob() { + } + /** * Get the earlyTermination property: Early termination policies enable canceling poor-performing runs before they * complete. @@ -233,6 +236,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 +278,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/SweepJobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java index 14a2a0d786da..6bca811bd403 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java @@ -33,6 +33,10 @@ public final class SweepJobLimits extends JobLimits { @JsonProperty(value = "trialTimeout") private Duration trialTimeout; + /** Creates an instance of SweepJobLimits class. */ + public SweepJobLimits() { + } + /** * Get the maxConcurrentTrials property: Sweep Job max concurrent trials. * 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..92f5757fee5b 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 @@ -20,6 +20,10 @@ public final class SynapseSpark extends Compute { @JsonProperty(value = "properties") private SynapseSparkProperties properties; + /** Creates an instance of SynapseSpark class. */ + public SynapseSpark() { + } + /** * Get the properties property: The properties property. * @@ -54,13 +58,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/SynapseSparkProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java index 4b5aa30f06cc..29e0a16a673d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java @@ -70,6 +70,10 @@ public final class SynapseSparkProperties { @JsonProperty(value = "poolName") private String poolName; + /** Creates an instance of SynapseSparkProperties class. */ + public SynapseSparkProperties() { + } + /** * Get the autoScaleProperties property: Auto scale properties. * 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..8d402f93b462 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.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; + +/** 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; + + /** Creates an instance of SystemCreatedAcrAccount class. */ + public SystemCreatedAcrAccount() { + } + + /** + * 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..de7c6aa63e3f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of SystemCreatedStorageAccount class. */ + public SystemCreatedStorageAccount() { + } + + /** + * 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/SystemService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java index ce5e576330a5..3bdbdeaf51e7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java @@ -28,6 +28,10 @@ public final class SystemService { @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; + /** Creates an instance of SystemService class. */ + public SystemService() { + } + /** * Get the systemServiceType property: The type of this system service. * 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..4a6f593253c2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableFixedParameters.java @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of TableFixedParameters class. */ + public TableFixedParameters() { + } + + /** + * 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..d2840a20c83d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableParameterSubspace.java @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of TableParameterSubspace class. */ + public TableParameterSubspace() { + } + + /** + * 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..54410f5fd491 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableSweepSettings.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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; + + /** Creates an instance of TableSweepSettings class. */ + public TableSweepSettings() { + } + + /** + * 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..f5becc1da990 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,80 @@ 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; + + /** Creates an instance of TableVertical class. */ + public TableVertical() { + } /** - * 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 +133,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 +174,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 testDataSize value. + */ + public Double testDataSize() { + return this.testDataSize; + } + + /** + * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) Applied when validation dataset is not provided. + * + * @param testDataSize the testDataSize value to set. + * @return the TableVertical object itself. + */ + public TableVertical withTestDataSize(Double testDataSize) { + this.testDataSize = testDataSize; + return this; + } + + /** + * Get the validationData property: Validation data inputs. + * + * @return the validationData value. + */ + public MLTableJobInput validationData() { + return this.validationData; + } + + /** + * Set the validationData property: Validation data inputs. + * + * @param validationData the validationData value to set. + * @return the TableVertical object itself. + */ + public TableVertical withValidationData(MLTableJobInput validationData) { + this.validationData = validationData; + return this; + } + + /** + * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation + * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. + * + * @return the validationDataSize value. + */ + public Double validationDataSize() { + return this.validationDataSize; + } + + /** + * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation + * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. + * + * @param validationDataSize the validationDataSize value to set. + * @return the TableVertical object itself. + */ + public TableVertical withValidationDataSize(Double validationDataSize) { + this.validationDataSize = validationDataSize; + return this; + } + + /** + * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column + * as an input, causing rows in the data to be weighted up or down. * - * @return the trainingSettings value. + * @return the weightColumnName value. */ - public TrainingSettings trainingSettings() { - return this.trainingSettings; + public String weightColumnName() { + return this.weightColumnName; } /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * 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 trainingSettings the trainingSettings value to set. + * @param weightColumnName the weightColumnName value to set. * @return the TableVertical object itself. */ - public TableVertical withTrainingSettings(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; + public TableVertical withWeightColumnName(String weightColumnName) { + this.weightColumnName = weightColumnName; return this; } @@ -120,17 +349,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..d7ab964abe6d 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,31 +33,32 @@ 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) private Map> transformerParams; + /** Creates an instance of TableVerticalFeaturizationSettings class. */ + public TableVerticalFeaturizationSettings() { + } + /** * Get the blockedTransformers property: These transformers shall not be used in featurization. * * @return the blockedTransformers value. */ - public List blockedTransformers() { + public List blockedTransformers() { return this.blockedTransformers; } @@ -74,7 +68,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 +93,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..76b4f5a85807 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. */ @@ -54,6 +66,10 @@ public final class TableVerticalLimitSettings { @JsonProperty(value = "trialTimeout") private Duration trialTimeout; + /** Creates an instance of TableVerticalLimitSettings class. */ + public TableVerticalLimitSettings() { + } + /** * Get the enableEarlyTermination property: Enable early termination, determines whether or not if AutoMLJob will * terminate early if there is no score improvement in last 20 iterations. @@ -156,6 +172,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/TargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java index 247e53fc3cbf..fccdc8d599ff 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java @@ -22,6 +22,10 @@ }) @Immutable public class TargetLags { + /** Creates an instance of TargetLags class. */ + public TargetLags() { + } + /** * Validates the instance. * 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/TargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java index 6d4fcbc957ab..3596ee80736e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java @@ -22,6 +22,10 @@ }) @Immutable public class TargetRollingWindowSize { + /** Creates an instance of TargetRollingWindowSize class. */ + public TargetRollingWindowSize() { + } + /** * Validates the instance. * 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..c40f464a708f 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; @@ -41,6 +39,10 @@ public final class TargetUtilizationScaleSettings extends OnlineScaleSettings { @JsonProperty(value = "targetUtilizationPercentage") private Integer targetUtilizationPercentage; + /** Creates an instance of TargetUtilizationScaleSettings class. */ + public TargetUtilizationScaleSettings() { + } + /** * Get the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will * be reserved for max_instances. 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/TensorFlow.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java index 01479f1c2d57..618e0345d142 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java @@ -26,6 +26,10 @@ public final class TensorFlow extends DistributionConfiguration { @JsonProperty(value = "workerCount") private Integer workerCount; + /** Creates an instance of TensorFlow class. */ + public TensorFlow() { + } + /** * Get the parameterServerCount property: Number of parameter server tasks. * 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..ba8bb3dfee3a 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,46 @@ 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; + + /** Creates an instance of TextClassification class. */ + public TextClassification() { + } + /** * Get the primaryMetric property: Primary metric for Text-Classification task. * @@ -59,42 +82,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 +141,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 +210,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 +232,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..55baedcc8075 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,51 @@ 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; + + /** Creates an instance of TextClassificationMultilabel class. */ + public TextClassificationMultilabel() { + } + /** * Get the primaryMetric property: Primary metric for Text-Classification-Multilabel task. Currently only Accuracy * is supported as primary metric, hence user need not set it explicitly. @@ -51,43 +73,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 +133,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 +202,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 +224,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..503be3ced15f 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,51 @@ 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; + + /** Creates an instance of TextNer class. */ + public TextNer() { + } + /** * Get the primaryMetric property: Primary metric for Text-NER task. Only 'Accuracy' is supported for Text-NER, so * user need not set this explicitly. @@ -51,42 +73,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 +132,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 +201,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 +223,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..77538483da3d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.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.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; + + /** Creates an instance of TmpfsOptions class. */ + public TmpfsOptions() { + } + + /** + * Get the size property: Mention the Tmpfs size. + * + * @return the size value. + */ + public Integer size() { + return this.size; + } + + /** + * Set the size property: Mention the Tmpfs size. + * + * @param size the size value to set. + * @return the TmpfsOptions object itself. + */ + public TmpfsOptions withSize(Integer size) { + this.size = size; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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..cade4da66865 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; @@ -56,6 +55,10 @@ public final class TrainingSettings { @JsonProperty(value = "stackEnsembleSettings") private StackEnsembleSettings stackEnsembleSettings; + /** Creates an instance of TrainingSettings class. */ + public TrainingSettings() { + } + /** * Get the enableDnnTraining property: Enable recommendation of DNN models. * 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..71293f3a75c8 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,11 @@ public final class TrialComponent { * Compute Resource configuration for the job. */ @JsonProperty(value = "resources") - private ResourceConfiguration resources; + private JobResourceConfiguration resources; + + /** Creates an instance of TrialComponent class. */ + public TrialComponent() { + } /** * Get the codeId property: ARM resource ID of the code asset. @@ -160,7 +161,7 @@ public TrialComponent withEnvironmentVariables(Map environmentVa * * @return the resources value. */ - public ResourceConfiguration resources() { + public JobResourceConfiguration resources() { return this.resources; } @@ -170,7 +171,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..acb387b33a95 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of TriggerBase class. */ + public TriggerBase() { + } + + /** + * Get the endTime property: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer + * https://en.wikipedia.org/wiki/ISO_8601. Recommented format would be "2022-06-01T00:00:01" If not present, the + * schedule will run indefinitely. + * + * @return the endTime value. + */ + public String endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer + * https://en.wikipedia.org/wiki/ISO_8601. Recommented format would be "2022-06-01T00:00:01" If not present, the + * schedule will run indefinitely. + * + * @param endTime the endTime value to set. + * @return the TriggerBase object itself. + */ + public TriggerBase withEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the startTime property: Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + * + * @param startTime the startTime value to set. + * @return the TriggerBase object itself. + */ + public TriggerBase withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @param timeZone the timeZone value to set. + * @return the TriggerBase object itself. + */ + public TriggerBase withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java 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..44b616664524 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 { /* @@ -27,6 +27,10 @@ public final class TritonModelJobInput extends JobInput { @JsonProperty(value = "uri", required = true) private String uri; + /** Creates an instance of TritonModelJobInput class. */ + public TritonModelJobInput() { + } + /** * Get the mode property: Input Asset Delivery Mode. * 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..f7630d5f5c70 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 { /* @@ -26,6 +26,10 @@ public final class TritonModelJobOutput extends JobOutput { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of TritonModelJobOutput class. */ + public TritonModelJobOutput() { + } + /** * Get the mode property: Output Asset Delivery Mode. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java index 13edc38b8116..2399793310aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java @@ -20,6 +20,10 @@ public final class TruncationSelectionPolicy extends EarlyTerminationPolicy { @JsonProperty(value = "truncationPercentage") private Integer truncationPercentage; + /** Creates an instance of TruncationSelectionPolicy class. */ + public TruncationSelectionPolicy() { + } + /** * Get the truncationPercentage property: The percentage of runs to cancel at each evaluation interval. * 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..88d2a8f9fa55 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,11 +37,17 @@ 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; + /** Creates an instance of UpdateWorkspaceQuotas class. */ + public UpdateWorkspaceQuotas() { + } + /** * Get the id property: Specifies the resource ID. * @@ -59,7 +67,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 +78,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 +100,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 +111,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..0fe62c32561a 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,13 @@ /** 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 { + /** Creates an instance of UriFileDataVersion class. */ + public UriFileDataVersion() { + } + /** {@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..c52666009a7f 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 { /* @@ -27,6 +27,10 @@ public final class UriFileJobInput extends JobInput { @JsonProperty(value = "uri", required = true) private String uri; + /** Creates an instance of UriFileJobInput class. */ + public UriFileJobInput() { + } + /** * Get the mode property: Input Asset Delivery Mode. * 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..e59ccfb629ef 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 { /* @@ -26,6 +26,10 @@ public final class UriFileJobOutput extends JobOutput { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of UriFileJobOutput class. */ + public UriFileJobOutput() { + } + /** * Get the mode property: Output Asset Delivery Mode. * 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..5904ef425eb8 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,13 @@ /** 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 { + /** Creates an instance of UriFolderDataVersion class. */ + public UriFolderDataVersion() { + } + /** {@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..1434274fa4f7 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 { /* @@ -27,6 +27,10 @@ public final class UriFolderJobInput extends JobInput { @JsonProperty(value = "uri", required = true) private String uri; + /** Creates an instance of UriFolderJobInput class. */ + public UriFolderJobInput() { + } + /** * Get the mode property: Input Asset Delivery Mode. * 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..c0a7ef31b48f 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 { /* @@ -26,6 +26,10 @@ public final class UriFolderJobOutput extends JobOutput { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of UriFolderJobOutput class. */ + public UriFolderJobOutput() { + } + /** * Get the mode property: Output Asset Delivery Mode. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java index f6a92090d1da..de4afdbbbac5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java @@ -22,6 +22,10 @@ public final class UsageName { @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) private String localizedValue; + /** Creates an instance of UsageName class. */ + public UsageName() { + } + /** * Get the value property: The name of the resource. * 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..617f6a6e5ec2 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,37 @@ @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; + /** Creates an instance of UserAccountCredentials class. */ + public UserAccountCredentials() { + } + /** - * Get the adminUsername property: User name. Name of the administrator user account which can be used to SSH to - * nodes. + * 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 +51,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 +64,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 +75,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 +88,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 +99,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/UserAssignedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java index 7a11f8067b79..efc6c81be31d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java @@ -23,6 +23,10 @@ public class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; + /** Creates an instance of UserAssignedIdentity class. */ + public UserAssignedIdentity() { + } + /** * Get the principalId property: The principal ID of the assigned identity. * 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..7cabd36e6043 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.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.JsonProperty; + +/** The UserCreatedAcrAccount model. */ +@Fluent +public final class UserCreatedAcrAccount { + /* + * ARM ResourceId of a resource + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /** Creates an instance of UserCreatedAcrAccount class. */ + public UserCreatedAcrAccount() { + } + + /** + * Get the armResourceId property: ARM ResourceId of a resource. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: ARM ResourceId of a resource. + * + * @param armResourceId the armResourceId value to set. + * @return the UserCreatedAcrAccount object itself. + */ + public UserCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} 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..f23f2f94f478 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.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.JsonProperty; + +/** The UserCreatedStorageAccount model. */ +@Fluent +public final class UserCreatedStorageAccount { + /* + * ARM ResourceId of a resource + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /** Creates an instance of UserCreatedStorageAccount class. */ + public UserCreatedStorageAccount() { + } + + /** + * Get the armResourceId property: ARM ResourceId of a resource. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: ARM ResourceId of a resource. + * + * @param armResourceId the armResourceId value to set. + * @return the UserCreatedStorageAccount object itself. + */ + public UserCreatedStorageAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java index 788905e65a24..bd76cf17193e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java @@ -13,6 +13,10 @@ @JsonTypeName("UserIdentity") @Immutable public class UserIdentity extends IdentityConfiguration { + /** Creates an instance of UserIdentity class. */ + public UserIdentity() { + } + /** * Validates the instance. * 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..1948bc6a69dc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The UsernamePasswordAuthTypeWorkspaceConnectionProperties model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("UsernamePassword") +@Fluent +public final class UsernamePasswordAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionUsernamePassword credentials; + + /** Creates an instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties class. */ + public UsernamePasswordAuthTypeWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionUsernamePassword credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the UsernamePasswordAuthTypeWorkspaceConnectionProperties object itself. + */ + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCredentials( + WorkspaceConnectionUsernamePassword credentials) { + this.credentials = credentials; + return this; + } + + /** {@inheritDoc} */ + @Override + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(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..570da51e7a55 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 @@ -20,6 +20,10 @@ public final class VirtualMachine extends Compute { @JsonProperty(value = "properties") private VirtualMachineSchemaProperties properties; + /** Creates an instance of VirtualMachine class. */ + public VirtualMachine() { + } + /** * Get the properties property: The properties property. * @@ -54,13 +58,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/VirtualMachineImage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java index 0f8a928cd8b4..bbbf91671967 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java @@ -17,6 +17,10 @@ public final class VirtualMachineImage { @JsonProperty(value = "id", required = true) private String id; + /** Creates an instance of VirtualMachineImage class. */ + public VirtualMachineImage() { + } + /** * Get the id property: Virtual Machine image path. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java index e2c9013f20c7..b519477bcd6e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java @@ -16,6 +16,10 @@ public class VirtualMachineSchema { @JsonProperty(value = "properties") private VirtualMachineSchemaProperties properties; + /** Creates an instance of VirtualMachineSchema class. */ + public VirtualMachineSchema() { + } + /** * Get the properties property: The properties property. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java index d600ba995792..2b5d333a7a08 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java @@ -46,6 +46,10 @@ public final class VirtualMachineSchemaProperties { @JsonProperty(value = "isNotebookInstanceCompute") private Boolean isNotebookInstanceCompute; + /** Creates an instance of VirtualMachineSchemaProperties class. */ + public VirtualMachineSchemaProperties() { + } + /** * Get the virtualMachineSize property: Virtual Machine size. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java index ca2ac04360aa..3d8b393e3060 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java @@ -21,6 +21,10 @@ public final class VirtualMachineSecrets extends ComputeSecretsInner { @JsonProperty(value = "administratorAccount") private VirtualMachineSshCredentials administratorAccount; + /** Creates an instance of VirtualMachineSecrets class. */ + public VirtualMachineSecrets() { + } + /** * Get the administratorAccount property: Admin credentials for virtual machine. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java index a48ebb8b0667..f4554787497e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java @@ -16,6 +16,10 @@ public class VirtualMachineSecretsSchema { @JsonProperty(value = "administratorAccount") private VirtualMachineSshCredentials administratorAccount; + /** Creates an instance of VirtualMachineSecretsSchema class. */ + public VirtualMachineSecretsSchema() { + } + /** * Get the administratorAccount property: Admin credentials for virtual machine. * 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..bc6f90030632 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,21 @@ 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; + /** Creates an instance of VirtualMachineSize class. */ + public VirtualMachineSize() { + } + /** - * 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 +113,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 +124,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 +135,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 +146,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 +157,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 +168,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 +179,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 +190,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 +221,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 +232,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/VirtualMachineSizes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java index ee81bed746b9..e1c429840f0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java @@ -13,22 +13,22 @@ public interface VirtualMachineSizes { * Returns supported VM Sizes in a location. * * @param location The location upon which virtual-machine-sizes is queried. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. + * @return the List Virtual Machine size operation response along with {@link Response}. */ - VirtualMachineSizeListResult list(String location); + Response listWithResponse(String location, Context context); /** * Returns supported VM Sizes in a location. * * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response along with {@link Response}. + * @return the List Virtual Machine size operation response. */ - Response listWithResponse(String location, Context context); + VirtualMachineSizeListResult list(String location); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java index ceb1a64c8c8d..a29f0542a20b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java @@ -34,6 +34,10 @@ public final class VirtualMachineSshCredentials { @JsonProperty(value = "privateKeyData") private String privateKeyData; + /** Creates an instance of VirtualMachineSshCredentials class. */ + public VirtualMachineSshCredentials() { + } + /** * Get the username property: Username of admin account. * 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..e0e00bcfe34b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of VolumeDefinition class. */ + public VolumeDefinition() { + } + + /** + * 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..8570820647d8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.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.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; + + /** Creates an instance of VolumeOptions class. */ + public VolumeOptions() { + } + + /** + * Get the nocopy property: Indicate whether volume is nocopy. + * + * @return the nocopy value. + */ + public Boolean nocopy() { + return this.nocopy; + } + + /** + * Set the nocopy property: Indicate whether volume is nocopy. + * + * @param nocopy the nocopy value to set. + * @return the VolumeOptions object itself. + */ + public VolumeOptions withNocopy(Boolean nocopy) { + this.nocopy = nocopy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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..a5aa4b348c09 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. @@ -716,17 +761,6 @@ interface WithContainerRegistry { */ Workspace refresh(Context context); - /** - * Diagnose workspace setup issue. - * - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters); - /** * Diagnose workspace setup issue. * @@ -752,23 +786,23 @@ interface WithContainerRegistry { * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ - ListWorkspaceKeysResult listKeys(); + Response listKeysWithResponse(Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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}. + * @return the response. */ - Response listKeysWithResponse(Context context); + ListWorkspaceKeysResult listKeys(); /** * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and @@ -793,22 +827,22 @@ interface WithContainerRegistry { /** * return notebook access token and refresh token. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ - NotebookAccessTokenResult listNotebookAccessToken(); + Response listNotebookAccessTokenWithResponse(Context context); /** * return notebook access token and refresh token. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ - Response listNotebookAccessTokenWithResponse(Context context); + NotebookAccessTokenResult listNotebookAccessToken(); /** * Prepare a notebook. @@ -830,15 +864,6 @@ interface WithContainerRegistry { */ NotebookResourceInfo prepareNotebook(Context context); - /** - * List storage account keys of a workspace. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListStorageAccountKeysResult listStorageAccountKeys(); - /** * List storage account keys of a workspace. * @@ -851,13 +876,13 @@ interface WithContainerRegistry { Response listStorageAccountKeysWithResponse(Context context); /** - * List keys of a notebook. + * List storage account keys of a workspace. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - ListNotebookKeysResult listNotebookKeys(); + ListStorageAccountKeysResult listStorageAccountKeys(); /** * List keys of a notebook. @@ -869,4 +894,13 @@ interface WithContainerRegistry { * @return the response body along with {@link Response}. */ Response listNotebookKeysWithResponse(Context context); + + /** + * List keys of a notebook. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListNotebookKeysResult listNotebookKeys(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/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..4240428879e1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated 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; + + /** Creates an instance of WorkspaceConnectionAccessKey class. */ + public WorkspaceConnectionAccessKey() { + } + + /** + * Get the accessKeyId property: The accessKeyId property. + * + * @return the accessKeyId value. + */ + public String accessKeyId() { + return this.accessKeyId; + } + + /** + * Set the accessKeyId property: The accessKeyId property. + * + * @param accessKeyId the accessKeyId value to set. + * @return the WorkspaceConnectionAccessKey object itself. + */ + public WorkspaceConnectionAccessKey withAccessKeyId(String accessKeyId) { + this.accessKeyId = accessKeyId; + return this; + } + + /** + * Get the secretAccessKey property: The secretAccessKey property. + * + * @return the secretAccessKey value. + */ + public String secretAccessKey() { + return this.secretAccessKey; + } + + /** + * Set the secretAccessKey property: The secretAccessKey property. + * + * @param secretAccessKey the secretAccessKey value to set. + * @return the WorkspaceConnectionAccessKey object itself. + */ + public WorkspaceConnectionAccessKey withSecretAccessKey(String secretAccessKey) { + this.secretAccessKey = secretAccessKey; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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..8f7d813b83b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WorkspaceConnectionManagedIdentity model. */ +@Fluent +public class WorkspaceConnectionManagedIdentity { + /* + * The resourceId property. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * The clientId property. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /** Creates an instance of WorkspaceConnectionManagedIdentity class. */ + public WorkspaceConnectionManagedIdentity() { + } + + /** + * Get the resourceId property: The resourceId property. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resourceId property. + * + * @param resourceId the resourceId value to set. + * @return the WorkspaceConnectionManagedIdentity object itself. + */ + public WorkspaceConnectionManagedIdentity withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the clientId property: The clientId property. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The clientId property. + * + * @param clientId the clientId value to set. + * @return the WorkspaceConnectionManagedIdentity object itself. + */ + public WorkspaceConnectionManagedIdentity withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java new file mode 100644 index 000000000000..67e3cac9d34e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WorkspaceConnectionPersonalAccessToken model. */ +@Fluent +public final class WorkspaceConnectionPersonalAccessToken { + /* + * The pat property. + */ + @JsonProperty(value = "pat") + private String pat; + + /** Creates an instance of WorkspaceConnectionPersonalAccessToken class. */ + public WorkspaceConnectionPersonalAccessToken() { + } + + /** + * Get the pat property: The pat property. + * + * @return the pat value. + */ + public String pat() { + return this.pat; + } + + /** + * Set the pat property: The pat property. + * + * @param pat the pat value to set. + * @return the WorkspaceConnectionPersonalAccessToken object itself. + */ + public WorkspaceConnectionPersonalAccessToken withPat(String pat) { + this.pat = pat; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java new file mode 100644 index 000000000000..c2260c423eb8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The WorkspaceConnectionPropertiesV2 model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "authType", + defaultImpl = WorkspaceConnectionPropertiesV2.class) +@JsonTypeName("WorkspaceConnectionPropertiesV2") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "PAT", value = PatAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "SAS", value = SasAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "UsernamePassword", value = UsernamePasswordAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "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 class WorkspaceConnectionPropertiesV2 { + /* + * Category of the connection + */ + @JsonProperty(value = "category") + private String category; + + /* + * The target property. + */ + @JsonProperty(value = "target") + private String target; + + /* + * Value details of the workspace connection. + */ + @JsonProperty(value = "value") + private String value; + + /* + * format for the workspace connection value + */ + @JsonProperty(value = "valueFormat") + private ValueFormat valueFormat; + + /** Creates an instance of WorkspaceConnectionPropertiesV2 class. */ + public WorkspaceConnectionPropertiesV2() { + } + + /** + * Get the category property: Category of the connection. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: Category of the connection. + * + * @param category the category value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the target property: The target property. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: The target property. + * + * @param target the target value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the value property: Value details of the workspace connection. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Value details of the workspace connection. + * + * @param value the value value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the valueFormat property: format for the workspace connection value. + * + * @return the valueFormat value. + */ + public ValueFormat valueFormat() { + return this.valueFormat; + } + + /** + * Set the valueFormat property: format for the workspace connection value. + * + * @param valueFormat the valueFormat value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withValueFormat(ValueFormat valueFormat) { + this.valueFormat = valueFormat; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java 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..96ab1a4a1025 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model. */ +@Fluent +public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult { + /* + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The nextLink property. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult class. */ + public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult object itself. + */ + public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult withValue( + List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java new file mode 100644 index 000000000000..cbb693c4b8ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.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; + +/** 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; + + /** Creates an instance of WorkspaceConnectionServicePrincipal class. */ + public WorkspaceConnectionServicePrincipal() { + } + + /** + * Get the clientId property: The clientId property. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The clientId property. + * + * @param clientId the clientId value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecret property: The clientSecret property. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret property: The clientSecret property. + * + * @param clientSecret the clientSecret value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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..2bbccdb32664 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WorkspaceConnectionSharedAccessSignature model. */ +@Fluent +public final class WorkspaceConnectionSharedAccessSignature { + /* + * The sas property. + */ + @JsonProperty(value = "sas") + private String sas; + + /** Creates an instance of WorkspaceConnectionSharedAccessSignature class. */ + public WorkspaceConnectionSharedAccessSignature() { + } + + /** + * Get the sas property: The sas property. + * + * @return the sas value. + */ + public String sas() { + return this.sas; + } + + /** + * Set the sas property: The sas property. + * + * @param sas the sas value to set. + * @return the WorkspaceConnectionSharedAccessSignature object itself. + */ + public WorkspaceConnectionSharedAccessSignature withSas(String sas) { + this.sas = sas; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java new file mode 100644 index 000000000000..3f8e8255feba --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WorkspaceConnectionUsernamePassword model. */ +@Fluent +public final class WorkspaceConnectionUsernamePassword { + /* + * The username property. + */ + @JsonProperty(value = "username") + private String username; + + /* + * The password property. + */ + @JsonProperty(value = "password") + private String password; + + /** Creates an instance of WorkspaceConnectionUsernamePassword class. */ + public WorkspaceConnectionUsernamePassword() { + } + + /** + * Get the username property: The username property. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The username property. + * + * @param username the username value to set. + * @return the WorkspaceConnectionUsernamePassword object itself. + */ + public WorkspaceConnectionUsernamePassword withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: The password property. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password property. + * + * @param password the password value to set. + * @return the WorkspaceConnectionUsernamePassword object itself. + */ + public WorkspaceConnectionUsernamePassword withPassword(String password) { + this.password = password; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java index d94b5a973c35..2f00285075d1 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,113 +11,114 @@ /** 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. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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); + Response getWithResponse( + String resourceGroupName, String workspaceName, String connectionName, Context context); /** - * 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 context The context to associate with this operation. + * @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, String target, String category, Context context); + WorkspaceConnectionPropertiesV2BasicResource get( + 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. * @param connectionName Friendly name of the workspace connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. + * @return the {@link Response}. */ - WorkspaceConnection get(String resourceGroupName, String workspaceName, String connectionName); + Response deleteWithResponse( + 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. * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); + void delete(String resourceGroupName, String workspaceName, String connectionName); /** - * 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..074c218cf7c5 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,20 +13,22 @@ @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; + /** Creates an instance of WorkspaceListResult class. */ + public WorkspaceListResult() { + } + /** * Get the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink * field should be used to request the next list of machine learning workspaces. 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..48762a228fcf 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 @@ -38,6 +38,10 @@ public final class WorkspaceUpdateParameters { @JsonProperty(value = "properties") private WorkspacePropertiesUpdateParameters innerProperties; + /** Creates an instance of WorkspaceUpdateParameters class. */ + public WorkspaceUpdateParameters() { + } + /** * Get the tags property: The resource tags for the machine learning workspace. * @@ -294,6 +298,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/Workspaces.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java index f6d969bb1e61..3d21925cc55f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java @@ -15,25 +15,25 @@ public interface Workspaces { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. + * @return the properties of the specified machine learning workspace along with {@link Response}. */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. + * @return the properties of the specified machine learning workspace. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); + Workspace getByResourceGroup(String resourceGroupName, String workspaceName); /** * Deletes a machine learning workspace. @@ -84,20 +84,6 @@ public interface Workspaces { */ PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - DiagnoseResponseResult diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters); - /** * Diagnose workspace setup issue. * @@ -131,12 +117,14 @@ DiagnoseResponseResult diagnose( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ - ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName); + Response listKeysWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and @@ -144,14 +132,12 @@ DiagnoseResponseResult diagnose( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); + ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName); /** * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and @@ -201,18 +187,6 @@ Response listKeysWithResponse( */ PagedIterable list(String skip, Context context); - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); - /** * return notebook access token and refresh token. * @@ -228,7 +202,7 @@ Response listNotebookAccessTokenWithResponse( String resourceGroupName, String workspaceName, Context context); /** - * Prepare a notebook. + * return notebook access token and refresh token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -237,32 +211,32 @@ Response listNotebookAccessTokenWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName); + NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); /** * Prepare a notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context); + NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName); /** - * List storage account keys of a workspace. + * Prepare a notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName); + NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context); /** * List storage account keys of a workspace. @@ -279,7 +253,7 @@ Response listStorageAccountKeysWithResponse( String resourceGroupName, String workspaceName, Context context); /** - * List keys of a notebook. + * List storage account keys of a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -288,7 +262,7 @@ Response listStorageAccountKeysWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName); + ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName); /** * List keys of a notebook. @@ -305,7 +279,7 @@ Response listNotebookKeysWithResponse( String resourceGroupName, String workspaceName, Context context); /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * List keys of a notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -314,7 +288,7 @@ Response listNotebookKeysWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); + ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName); /** * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. @@ -330,6 +304,18 @@ Response listNotebookKeysWithResponse( Response listOutboundNetworkDependenciesEndpointsWithResponse( String resourceGroupName, String workspaceName, Context context); + /** + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); + /** * Gets the properties of the specified machine learning workspace. * 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..60c4b74965cb --- /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().deleteByResourceGroupWithResponse("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.