From f5a332429948ad148020fbb01ea81cc3cd0040b7 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 6 Jan 2022 03:30:20 +0000 Subject: [PATCH] CodeGen from PR 17182 in Azure/azure-rest-api-specs update-typescript.md (#17182) --- eng/versioning/version_client.txt | 1 + pom.xml | 1 + .../CHANGELOG.md | 5 + .../README.md | 102 + .../SAMPLE.md | 307 +++ .../pom.xml | 81 + .../MachineLearningComputeManager.java | 265 ++ ...achineLearningComputeManagementClient.java | 60 + .../fluent/MachineLearningComputesClient.java | 36 + .../OperationalizationClustersClient.java | 384 +++ .../models/AvailableOperationsInner.java | 55 + ...ServicesUpdatesAvailableResponseInner.java | 41 + ...ationalizationClusterCredentialsInner.java | 210 ++ .../OperationalizationClusterInner.java | 267 ++ .../OperationalizationClusterProperties.java | 300 +++ .../UpdateSystemServicesResponseInner.java | 71 + .../fluent/models/package-info.java | 13 + .../fluent/package-info.java | 13 + .../AvailableOperationsImpl.java | 41 + ...mServicesUpdatesAvailableResponseImpl.java | 35 + ...earningComputeManagementClientBuilder.java | 146 ++ ...neLearningComputeManagementClientImpl.java | 307 +++ .../MachineLearningComputesClientImpl.java | 160 ++ .../MachineLearningComputesImpl.java | 60 + ...rationalizationClusterCredentialsImpl.java | 59 + .../OperationalizationClusterImpl.java | 307 +++ .../OperationalizationClustersClientImpl.java | 2178 +++++++++++++++++ .../OperationalizationClustersImpl.java | 270 ++ .../UpdateSystemServicesResponseImpl.java | 43 + .../implementation/Utils.java | 204 ++ .../implementation/package-info.java | 13 + .../models/AcsClusterProperties.java | 218 ++ .../models/AgentVMSizeTypes.java | 169 ++ .../models/AppInsightsCredentials.java | 79 + .../models/AppInsightsProperties.java | 50 + .../models/AutoScaleConfiguration.java | 155 ++ .../models/AvailableOperations.java | 25 + ...ystemServicesUpdatesAvailableResponse.java | 26 + .../models/ClusterType.java | 34 + .../models/ContainerRegistryCredentials.java | 84 + .../models/ContainerRegistryProperties.java | 54 + .../models/ContainerServiceCredentials.java | 72 + .../models/GlobalServiceConfiguration.java | 178 ++ .../models/KubernetesClusterProperties.java | 53 + .../models/MachineLearningComputes.java | 31 + .../models/OperationStatus.java | 49 + .../models/OperationalizationCluster.java | 423 ++++ .../OperationalizationClusterCredentials.java | 61 + ...ationalizationClusterUpdateParameters.java | 63 + .../models/OperationalizationClusters.java | 257 ++ ...erationalizationClustersDeleteHeaders.java | 50 + ...rationalizationClustersDeleteResponse.java | 31 + ...onClustersUpdateSystemServicesHeaders.java | 51 + ...nClustersUpdateSystemServicesResponse.java | 38 + .../models/OrchestratorType.java | 34 + ...ginatedOperationalizationClustersList.java | 82 + .../models/ResourceOperation.java | 105 + .../models/ResourceOperationDisplay.java | 128 + .../models/ServiceAuthConfiguration.java | 97 + .../models/ServicePrincipalProperties.java | 91 + .../models/SslConfiguration.java | 131 + .../machinelearningcompute/models/Status.java | 34 + .../models/StorageAccountCredentials.java | 69 + .../models/StorageAccountProperties.java | 54 + .../models/SystemService.java | 85 + .../models/SystemServiceType.java | 37 + .../models/UpdateSystemServicesResponse.java | 40 + .../models/UpdatesAvailable.java | 34 + .../models/package-info.java | 13 + .../machinelearningcompute/package-info.java | 13 + .../src/main/java/module-info.java | 19 + ...ComputeListAvailableOperationsSamples.java | 23 + ...SystemServicesUpdatesAvailableSamples.java | 25 + ...lizationClustersCreateOrUpdateSamples.java | 69 + ...erationalizationClustersDeleteSamples.java | 23 + ...tionClustersGetByResourceGroupSamples.java | 25 + ...ionClustersListByResourceGroupSamples.java | 23 + ...ationalizationClustersListKeysSamples.java | 23 + ...OperationalizationClustersListSamples.java | 23 + ...erationalizationClustersUpdateSamples.java | 42 + ...onClustersUpdateSystemServicesSamples.java | 23 + sdk/machinelearningcompute/ci.yml | 39 + sdk/machinelearningcompute/pom.xml | 53 + 83 files changed, 9743 insertions(+) create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/CHANGELOG.md create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/README.md create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/SAMPLE.md create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/pom.xml create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/MachineLearningComputeManager.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/MachineLearningComputeManagementClient.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/MachineLearningComputesClient.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/OperationalizationClustersClient.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/AvailableOperationsInner.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/CheckSystemServicesUpdatesAvailableResponseInner.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterCredentialsInner.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterInner.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterProperties.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/UpdateSystemServicesResponseInner.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/package-info.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/package-info.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/AvailableOperationsImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/CheckSystemServicesUpdatesAvailableResponseImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputeManagementClientBuilder.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputeManagementClientImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputesClientImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputesImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClusterCredentialsImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClusterImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClustersClientImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClustersImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/UpdateSystemServicesResponseImpl.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/Utils.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/package-info.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AcsClusterProperties.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AgentVMSizeTypes.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AppInsightsCredentials.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AppInsightsProperties.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AutoScaleConfiguration.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AvailableOperations.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/CheckSystemServicesUpdatesAvailableResponse.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ClusterType.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerRegistryCredentials.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerRegistryProperties.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerServiceCredentials.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/GlobalServiceConfiguration.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/KubernetesClusterProperties.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/MachineLearningComputes.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationStatus.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationCluster.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusterCredentials.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusterUpdateParameters.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusters.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersDeleteHeaders.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersDeleteResponse.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersUpdateSystemServicesHeaders.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersUpdateSystemServicesResponse.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OrchestratorType.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/PaginatedOperationalizationClustersList.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ResourceOperation.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ResourceOperationDisplay.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ServiceAuthConfiguration.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ServicePrincipalProperties.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SslConfiguration.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/Status.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/StorageAccountCredentials.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/StorageAccountProperties.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SystemService.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SystemServiceType.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/UpdateSystemServicesResponse.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/UpdatesAvailable.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/package-info.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/package-info.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/module-info.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/MachineLearningComputeListAvailableOperationsSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersCheckSystemServicesUpdatesAvailableSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersCreateOrUpdateSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersDeleteSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersGetByResourceGroupSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListByResourceGroupSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListKeysSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersUpdateSamples.java create mode 100644 sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersUpdateSystemServicesSamples.java create mode 100644 sdk/machinelearningcompute/ci.yml create mode 100644 sdk/machinelearningcompute/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index b7a2f80351770..a45721329336f 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -331,6 +331,7 @@ com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.0.0-beta com.azure.resourcemanager:azure-resourcemanager-loadtestservice;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-automanage;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-machinelearningcompute;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.0.0 # Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current diff --git a/pom.xml b/pom.xml index aab77f33ebeb9..7115793047958 100644 --- a/pom.xml +++ b/pom.xml @@ -787,6 +787,7 @@ sdk/loganalytics sdk/logic sdk/logz + sdk/machinelearningcompute sdk/machinelearningservices sdk/maintenance sdk/managedapplications diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/CHANGELOG.md b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/CHANGELOG.md new file mode 100644 index 0000000000000..2086609b469ca --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2022-01-06) + +- Azure Resource Manager MachineLearningCompute client library for Java. This package contains Microsoft Azure SDK for MachineLearningCompute Management SDK. These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations:. Package tag package-2017-08-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/README.md b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/README.md new file mode 100644 index 0000000000000..6903544453822 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/README.md @@ -0,0 +1,102 @@ +# Azure Resource Manager MachineLearningCompute client library for Java + +Azure Resource Manager MachineLearningCompute client library for Java. + +This package contains Microsoft Azure SDK for MachineLearningCompute Management SDK. These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations:. Package tag package-2017-08-preview. 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 + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-machinelearningcompute;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-machinelearningcompute + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. + +### Authentication + +By default, Azure Active Directory token authentication depends on correct configure of following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. + +With above configuration, `azure` client can be authenticated by following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +MachineLearningComputeManager manager = MachineLearningComputeManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/SAMPLE.md b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/SAMPLE.md new file mode 100644 index 0000000000000..3340602b1b233 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/SAMPLE.md @@ -0,0 +1,307 @@ +# Code snippets and samples + + +## MachineLearningCompute + +- [ListAvailableOperations](#machinelearningcompute_listavailableoperations) + +## OperationalizationClusters + +- [CheckSystemServicesUpdatesAvailable](#operationalizationclusters_checksystemservicesupdatesavailable) +- [CreateOrUpdate](#operationalizationclusters_createorupdate) +- [Delete](#operationalizationclusters_delete) +- [GetByResourceGroup](#operationalizationclusters_getbyresourcegroup) +- [List](#operationalizationclusters_list) +- [ListByResourceGroup](#operationalizationclusters_listbyresourcegroup) +- [ListKeys](#operationalizationclusters_listkeys) +- [Update](#operationalizationclusters_update) +- [UpdateSystemServices](#operationalizationclusters_updatesystemservices) +### MachineLearningCompute_ListAvailableOperations + +```java +import com.azure.core.util.Context; + +/** Samples for MachineLearningCompute ListAvailableOperations. */ +public final class MachineLearningComputeListAvailableOperationsSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/MachineLearningCompute_ListAvailableOperations.json + */ + /** + * Sample code: Machine Learning Compute List Available Operations. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void machineLearningComputeListAvailableOperations( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.machineLearningComputes().listAvailableOperationsWithResponse(Context.NONE); + } +} +``` + +### OperationalizationClusters_CheckSystemServicesUpdatesAvailable + +```java +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters CheckSystemServicesUpdatesAvailable. */ +public final class OperationalizationClustersCheckSystemServicesUpdatesAvailableSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CheckSystemServicesUpdatesAvailable.json + */ + /** + * Sample code: Check Update for an Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void checkUpdateForAnOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager + .operationalizationClusters() + .checkSystemServicesUpdatesAvailableWithResponse("myResourceGroup", "myCluster", Context.NONE); + } +} +``` + +### OperationalizationClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearningcompute.models.AcsClusterProperties; +import com.azure.resourcemanager.machinelearningcompute.models.ClusterType; +import com.azure.resourcemanager.machinelearningcompute.models.GlobalServiceConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.KubernetesClusterProperties; +import com.azure.resourcemanager.machinelearningcompute.models.OrchestratorType; +import com.azure.resourcemanager.machinelearningcompute.models.ServicePrincipalProperties; +import com.azure.resourcemanager.machinelearningcompute.models.SslConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.Status; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OperationalizationClusters CreateOrUpdate. */ +public final class OperationalizationClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CreateOrUpdate.json + */ + /** + * Sample code: PUT Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void pUTOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager + .operationalizationClusters() + .define("myCluster") + .withRegion("West US") + .withExistingResourceGroup("myResourceGroup") + .withTags(mapOf("key1", "alpha", "key2", "beta")) + .withDescription("My Operationalization Cluster") + .withClusterType(ClusterType.ACS) + .withContainerService( + new AcsClusterProperties() + .withOrchestratorType(OrchestratorType.KUBERNETES) + .withOrchestratorProperties( + new KubernetesClusterProperties() + .withServicePrincipal( + new ServicePrincipalProperties() + .withClientId("abcdefghijklmnopqrt") + .withSecret("")))) + .withGlobalServiceConfiguration( + new GlobalServiceConfiguration() + .withSsl( + new SslConfiguration() + .withStatus(Status.ENABLED) + .withCert("afjdklq2131casfakld=") + .withKey("flksdafkldsajf=") + .withCname("foo.bar.com")) + .withAdditionalProperties(mapOf())) + .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; + } +} +``` + +### OperationalizationClusters_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters Delete. */ +public final class OperationalizationClustersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Delete.json + */ + /** + * Sample code: DELETE Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void dELETEOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().delete("myResourceGroup", "myCluster", null, Context.NONE); + } +} +``` + +### OperationalizationClusters_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters GetByResourceGroup. */ +public final class OperationalizationClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Get.json + */ + /** + * Sample code: GET Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void gETOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager + .operationalizationClusters() + .getByResourceGroupWithResponse("myResourceGroup", "myCluster", Context.NONE); + } +} +``` + +### OperationalizationClusters_List + +```java +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters List. */ +public final class OperationalizationClustersListSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListBySubscription.json + */ + /** + * Sample code: List Operationalization Clusters by Subscription. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void listOperationalizationClustersBySubscription( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().list(null, Context.NONE); + } +} +``` + +### OperationalizationClusters_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters ListByResourceGroup. */ +public final class OperationalizationClustersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListByResourceGroup.json + */ + /** + * Sample code: List Operationalization Clusters by Resource Group. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void listOperationalizationClustersByResourceGroup( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().listByResourceGroup("myResourceGroup", null, Context.NONE); + } +} +``` + +### OperationalizationClusters_ListKeys + +```java +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters ListKeys. */ +public final class OperationalizationClustersListKeysSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListKeys.json + */ + /** + * Sample code: List Keys of an Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void listKeysOfAnOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().listKeysWithResponse("myResourceGroup", "myCluster", Context.NONE); + } +} +``` + +### OperationalizationClusters_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationCluster; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OperationalizationClusters Update. */ +public final class OperationalizationClustersUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Update.json + */ + /** + * Sample code: PATCH Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void pATCHOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + OperationalizationCluster resource = + manager + .operationalizationClusters() + .getByResourceGroupWithResponse("myResourceGroup", "myCluster", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key1", "value1")).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; + } +} +``` + +### OperationalizationClusters_UpdateSystemServices + +```java +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters UpdateSystemServices. */ +public final class OperationalizationClustersUpdateSystemServicesSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_UpdateSystemServices.json + */ + /** + * Sample code: Update System Services in an Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void updateSystemServicesInAnOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().updateSystemServices("myResourceGroup", "myCluster", Context.NONE); + } +} +``` + diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/pom.xml b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/pom.xml new file mode 100644 index 0000000000000..857bd5407ae54 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/pom.xml @@ -0,0 +1,81 @@ + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-machinelearningcompute + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for MachineLearningCompute Management + This package contains Microsoft Azure SDK for MachineLearningCompute 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 Compute resources. They support the following operations:<ul><li>Create or update a cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete a cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in a resource group</li><li>Get all clusters in a subscription</li></ul>. Package tag package-2017-08-preview. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + false + + + + + + com.azure + azure-core + 1.23.1 + + + com.azure + azure-core-management + 1.4.4 + + + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + + + + java.method.addedToInterface + + + true + .* + com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)* + + + + + + + + diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/MachineLearningComputeManager.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/MachineLearningComputeManager.java new file mode 100644 index 0000000000000..7a820a3055dc3 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/MachineLearningComputeManager.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.fluent.MachineLearningComputeManagementClient; +import com.azure.resourcemanager.machinelearningcompute.implementation.MachineLearningComputeManagementClientBuilder; +import com.azure.resourcemanager.machinelearningcompute.implementation.MachineLearningComputesImpl; +import com.azure.resourcemanager.machinelearningcompute.implementation.OperationalizationClustersImpl; +import com.azure.resourcemanager.machinelearningcompute.models.MachineLearningComputes; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationClusters; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Entry point to MachineLearningComputeManager. These APIs allow end users to operate on Azure Machine Learning Compute + * resources. They support the following operations:<ul><li>Create or update a + * cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete a + * cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system + * services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in + * a resource group</li><li>Get all clusters in a subscription</li></ul>. + */ +public final class MachineLearningComputeManager { + private OperationalizationClusters operationalizationClusters; + + private MachineLearningComputes machineLearningComputes; + + private final MachineLearningComputeManagementClient clientObject; + + private MachineLearningComputeManager( + HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = + new MachineLearningComputeManagementClientBuilder() + .pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of MachineLearningCompute service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the MachineLearningCompute service API instance. + */ + public static MachineLearningComputeManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Gets a Configurable instance that can be used to create MachineLearningComputeManager with optional + * configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new MachineLearningComputeManager.Configurable(); + } + + /** The Configurable allowing configurations to be set. */ + public static final class Configurable { + private final ClientLogger logger = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of MachineLearningCompute service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the MachineLearningCompute service API instance. + */ + public MachineLearningComputeManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder + .append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.machinelearningcompute") + .append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder + .append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new MachineLearningComputeManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** @return Resource collection API of OperationalizationClusters. */ + public OperationalizationClusters operationalizationClusters() { + if (this.operationalizationClusters == null) { + this.operationalizationClusters = + new OperationalizationClustersImpl(clientObject.getOperationalizationClusters(), this); + } + return operationalizationClusters; + } + + /** @return Resource collection API of MachineLearningComputes. */ + public MachineLearningComputes machineLearningComputes() { + if (this.machineLearningComputes == null) { + this.machineLearningComputes = + new MachineLearningComputesImpl(clientObject.getMachineLearningComputes(), this); + } + return machineLearningComputes; + } + + /** + * @return Wrapped service client MachineLearningComputeManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + */ + public MachineLearningComputeManagementClient serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/MachineLearningComputeManagementClient.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/MachineLearningComputeManagementClient.java new file mode 100644 index 0000000000000..d29eb634d429b --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/MachineLearningComputeManagementClient.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** The interface for MachineLearningComputeManagementClient class. */ +public interface MachineLearningComputeManagementClient { + /** + * Gets The Azure subscription ID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the OperationalizationClustersClient object to access its operations. + * + * @return the OperationalizationClustersClient object. + */ + OperationalizationClustersClient getOperationalizationClusters(); + + /** + * Gets the MachineLearningComputesClient object to access its operations. + * + * @return the MachineLearningComputesClient object. + */ + MachineLearningComputesClient getMachineLearningComputes(); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/MachineLearningComputesClient.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/MachineLearningComputesClient.java new file mode 100644 index 0000000000000..87bf6f116d3c4 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/MachineLearningComputesClient.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.machinelearningcompute.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.AvailableOperationsInner; + +/** An instance of this class provides access to all the operations defined in MachineLearningComputesClient. */ +public interface MachineLearningComputesClient { + /** + * Gets all available operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AvailableOperationsInner listAvailableOperations(); + + /** + * Gets all available operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAvailableOperationsWithResponse(Context context); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/OperationalizationClustersClient.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/OperationalizationClustersClient.java new file mode 100644 index 0000000000000..b4f7c7c220c37 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/OperationalizationClustersClient.java @@ -0,0 +1,384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.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.machinelearningcompute.fluent.models.CheckSystemServicesUpdatesAvailableResponseInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterCredentialsInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.UpdateSystemServicesResponseInner; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationClusterUpdateParameters; + +/** An instance of this class provides access to all the operations defined in OperationalizationClustersClient. */ +public interface OperationalizationClustersClient { + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationalizationClusterInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters); + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationalizationClusterInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters, Context context); + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationalizationClusterInner createOrUpdate( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters); + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationalizationClusterInner createOrUpdate( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters, Context context); + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationalizationClusterInner getByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String clusterName, Context context); + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other + * properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters The parameters supplied to patch the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationalizationClusterInner update( + String resourceGroupName, String clusterName, OperationalizationClusterUpdateParameters parameters); + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other + * properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters The parameters supplied to patch the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String clusterName, + OperationalizationClusterUpdateParameters parameters, + Context context); + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Boolean deleteAll); + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String clusterName, Boolean deleteAll, Context context); + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, Boolean deleteAll); + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName); + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, Boolean deleteAll, Context context); + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationalizationClusterCredentialsInner listKeys(String resourceGroupName, String clusterName); + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKeysWithResponse( + String resourceGroupName, String clusterName, Context context); + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckSystemServicesUpdatesAvailableResponseInner checkSystemServicesUpdatesAvailable( + String resourceGroupName, String clusterName); + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkSystemServicesUpdatesAvailableWithResponse( + String resourceGroupName, String clusterName, Context context); + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, UpdateSystemServicesResponseInner> + beginUpdateSystemServices(String resourceGroupName, String clusterName); + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, UpdateSystemServicesResponseInner> + beginUpdateSystemServices(String resourceGroupName, String clusterName, Context context); + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateSystemServicesResponseInner updateSystemServices(String resourceGroupName, String clusterName); + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateSystemServicesResponseInner updateSystemServices( + String resourceGroupName, String clusterName, Context context); + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup( + String resourceGroupName, String skiptoken, Context context); + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String skiptoken, Context context); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/AvailableOperationsInner.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/AvailableOperationsInner.java new file mode 100644 index 0000000000000..40e7935bb0bd8 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/AvailableOperationsInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.models.ResourceOperation; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Available operation list. */ +@Fluent +public final class AvailableOperationsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableOperationsInner.class); + + /* + * An array of available operations. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: An array of available operations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of available operations. + * + * @param value the value value to set. + * @return the AvailableOperationsInner object itself. + */ + public AvailableOperationsInner 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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/CheckSystemServicesUpdatesAvailableResponseInner.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/CheckSystemServicesUpdatesAvailableResponseInner.java new file mode 100644 index 0000000000000..0de919491592e --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/CheckSystemServicesUpdatesAvailableResponseInner.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.machinelearningcompute.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.models.UpdatesAvailable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information about updates available for system services in a cluster. */ +@Immutable +public final class CheckSystemServicesUpdatesAvailableResponseInner { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(CheckSystemServicesUpdatesAvailableResponseInner.class); + + /* + * Yes if updates are available for the system services, No if not. + */ + @JsonProperty(value = "updatesAvailable", access = JsonProperty.Access.WRITE_ONLY) + private UpdatesAvailable updatesAvailable; + + /** + * Get the updatesAvailable property: Yes if updates are available for the system services, No if not. + * + * @return the updatesAvailable value. + */ + public UpdatesAvailable updatesAvailable() { + return this.updatesAvailable; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterCredentialsInner.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterCredentialsInner.java new file mode 100644 index 0000000000000..cfed04ecdd82a --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterCredentialsInner.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.machinelearningcompute.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.models.AppInsightsCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.ContainerRegistryCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.ContainerServiceCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.ServiceAuthConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.SslConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.StorageAccountCredentials; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Credentials to resources in the cluster. */ +@Fluent +public final class OperationalizationClusterCredentialsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationalizationClusterCredentialsInner.class); + + /* + * Credentials for the Storage Account. + */ + @JsonProperty(value = "storageAccount") + private StorageAccountCredentials storageAccount; + + /* + * Credentials for Azure Container Registry. + */ + @JsonProperty(value = "containerRegistry") + private ContainerRegistryCredentials containerRegistry; + + /* + * Credentials for Azure Container Service. + */ + @JsonProperty(value = "containerService") + private ContainerServiceCredentials containerService; + + /* + * Credentials for Azure AppInsights. + */ + @JsonProperty(value = "appInsights") + private AppInsightsCredentials appInsights; + + /* + * Global authorization keys for all user services deployed in cluster. + * These are used if the service does not have auth keys. + */ + @JsonProperty(value = "serviceAuthConfiguration") + private ServiceAuthConfiguration serviceAuthConfiguration; + + /* + * The SSL configuration for the services. + */ + @JsonProperty(value = "sslConfiguration") + private SslConfiguration sslConfiguration; + + /** + * Get the storageAccount property: Credentials for the Storage Account. + * + * @return the storageAccount value. + */ + public StorageAccountCredentials storageAccount() { + return this.storageAccount; + } + + /** + * Set the storageAccount property: Credentials for the Storage Account. + * + * @param storageAccount the storageAccount value to set. + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withStorageAccount(StorageAccountCredentials storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Get the containerRegistry property: Credentials for Azure Container Registry. + * + * @return the containerRegistry value. + */ + public ContainerRegistryCredentials containerRegistry() { + return this.containerRegistry; + } + + /** + * Set the containerRegistry property: Credentials for Azure Container Registry. + * + * @param containerRegistry the containerRegistry value to set. + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withContainerRegistry( + ContainerRegistryCredentials containerRegistry) { + this.containerRegistry = containerRegistry; + return this; + } + + /** + * Get the containerService property: Credentials for Azure Container Service. + * + * @return the containerService value. + */ + public ContainerServiceCredentials containerService() { + return this.containerService; + } + + /** + * Set the containerService property: Credentials for Azure Container Service. + * + * @param containerService the containerService value to set. + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withContainerService( + ContainerServiceCredentials containerService) { + this.containerService = containerService; + return this; + } + + /** + * Get the appInsights property: Credentials for Azure AppInsights. + * + * @return the appInsights value. + */ + public AppInsightsCredentials appInsights() { + return this.appInsights; + } + + /** + * Set the appInsights property: Credentials for Azure AppInsights. + * + * @param appInsights the appInsights value to set. + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withAppInsights(AppInsightsCredentials appInsights) { + this.appInsights = appInsights; + return this; + } + + /** + * Get the serviceAuthConfiguration property: Global authorization keys for all user services deployed in cluster. + * These are used if the service does not have auth keys. + * + * @return the serviceAuthConfiguration value. + */ + public ServiceAuthConfiguration serviceAuthConfiguration() { + return this.serviceAuthConfiguration; + } + + /** + * Set the serviceAuthConfiguration property: Global authorization keys for all user services deployed in cluster. + * These are used if the service does not have auth keys. + * + * @param serviceAuthConfiguration the serviceAuthConfiguration value to set. + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withServiceAuthConfiguration( + ServiceAuthConfiguration serviceAuthConfiguration) { + this.serviceAuthConfiguration = serviceAuthConfiguration; + return this; + } + + /** + * Get the sslConfiguration property: The SSL configuration for the services. + * + * @return the sslConfiguration value. + */ + public SslConfiguration sslConfiguration() { + return this.sslConfiguration; + } + + /** + * Set the sslConfiguration property: The SSL configuration for the services. + * + * @param sslConfiguration the sslConfiguration value to set. + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withSslConfiguration(SslConfiguration sslConfiguration) { + this.sslConfiguration = sslConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccount() != null) { + storageAccount().validate(); + } + if (containerRegistry() != null) { + containerRegistry().validate(); + } + if (containerService() != null) { + containerService().validate(); + } + if (appInsights() != null) { + appInsights().validate(); + } + if (serviceAuthConfiguration() != null) { + serviceAuthConfiguration().validate(); + } + if (sslConfiguration() != null) { + sslConfiguration().validate(); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterInner.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterInner.java new file mode 100644 index 0000000000000..f95c870a508dc --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterInner.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.models.AcsClusterProperties; +import com.azure.resourcemanager.machinelearningcompute.models.AppInsightsProperties; +import com.azure.resourcemanager.machinelearningcompute.models.ClusterType; +import com.azure.resourcemanager.machinelearningcompute.models.ContainerRegistryProperties; +import com.azure.resourcemanager.machinelearningcompute.models.GlobalServiceConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.OperationStatus; +import com.azure.resourcemanager.machinelearningcompute.models.StorageAccountProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** Instance of an Azure ML Operationalization Cluster resource. */ +@Fluent +public final class OperationalizationClusterInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationalizationClusterInner.class); + + /* + * Properties of an operationalization cluster. + */ + @JsonProperty(value = "properties") + private OperationalizationClusterProperties innerProperties; + + /** + * Get the innerProperties property: Properties of an operationalization cluster. + * + * @return the innerProperties value. + */ + private OperationalizationClusterProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public OperationalizationClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public OperationalizationClusterInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the description property: The description of the cluster. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the cluster. + * + * @param description the description value to set. + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new OperationalizationClusterProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the createdOn property: The date and time when the cluster was created. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.innerProperties() == null ? null : this.innerProperties().createdOn(); + } + + /** + * Get the modifiedOn property: The date and time when the cluster was last modified. + * + * @return the modifiedOn value. + */ + public OffsetDateTime modifiedOn() { + return this.innerProperties() == null ? null : this.innerProperties().modifiedOn(); + } + + /** + * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, + * Provisioning, Succeeded, and Failed. + * + * @return the provisioningState value. + */ + public OperationStatus provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the provisioningErrors property: List of provisioning errors reported by the resource provider. + * + * @return the provisioningErrors value. + */ + public List provisioningErrors() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningErrors(); + } + + /** + * Get the clusterType property: The cluster type. + * + * @return the clusterType value. + */ + public ClusterType clusterType() { + return this.innerProperties() == null ? null : this.innerProperties().clusterType(); + } + + /** + * Set the clusterType property: The cluster type. + * + * @param clusterType the clusterType value to set. + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withClusterType(ClusterType clusterType) { + if (this.innerProperties() == null) { + this.innerProperties = new OperationalizationClusterProperties(); + } + this.innerProperties().withClusterType(clusterType); + return this; + } + + /** + * Get the storageAccount property: Storage Account properties. + * + * @return the storageAccount value. + */ + public StorageAccountProperties storageAccount() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccount(); + } + + /** + * Set the storageAccount property: Storage Account properties. + * + * @param storageAccount the storageAccount value to set. + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withStorageAccount(StorageAccountProperties storageAccount) { + if (this.innerProperties() == null) { + this.innerProperties = new OperationalizationClusterProperties(); + } + this.innerProperties().withStorageAccount(storageAccount); + return this; + } + + /** + * Get the containerRegistry property: Container Registry properties. + * + * @return the containerRegistry value. + */ + public ContainerRegistryProperties containerRegistry() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistry(); + } + + /** + * Set the containerRegistry property: Container Registry properties. + * + * @param containerRegistry the containerRegistry value to set. + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withContainerRegistry(ContainerRegistryProperties containerRegistry) { + if (this.innerProperties() == null) { + this.innerProperties = new OperationalizationClusterProperties(); + } + this.innerProperties().withContainerRegistry(containerRegistry); + return this; + } + + /** + * Get the containerService property: Parameters for the Azure Container Service cluster. + * + * @return the containerService value. + */ + public AcsClusterProperties containerService() { + return this.innerProperties() == null ? null : this.innerProperties().containerService(); + } + + /** + * Set the containerService property: Parameters for the Azure Container Service cluster. + * + * @param containerService the containerService value to set. + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withContainerService(AcsClusterProperties containerService) { + if (this.innerProperties() == null) { + this.innerProperties = new OperationalizationClusterProperties(); + } + this.innerProperties().withContainerService(containerService); + return this; + } + + /** + * Get the appInsights property: AppInsights configuration. + * + * @return the appInsights value. + */ + public AppInsightsProperties appInsights() { + return this.innerProperties() == null ? null : this.innerProperties().appInsights(); + } + + /** + * Set the appInsights property: AppInsights configuration. + * + * @param appInsights the appInsights value to set. + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withAppInsights(AppInsightsProperties appInsights) { + if (this.innerProperties() == null) { + this.innerProperties = new OperationalizationClusterProperties(); + } + this.innerProperties().withAppInsights(appInsights); + return this; + } + + /** + * Get the globalServiceConfiguration property: Contains global configuration for the web services in the cluster. + * + * @return the globalServiceConfiguration value. + */ + public GlobalServiceConfiguration globalServiceConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().globalServiceConfiguration(); + } + + /** + * Set the globalServiceConfiguration property: Contains global configuration for the web services in the cluster. + * + * @param globalServiceConfiguration the globalServiceConfiguration value to set. + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withGlobalServiceConfiguration( + GlobalServiceConfiguration globalServiceConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new OperationalizationClusterProperties(); + } + this.innerProperties().withGlobalServiceConfiguration(globalServiceConfiguration); + 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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterProperties.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterProperties.java new file mode 100644 index 0000000000000..79843edece723 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/OperationalizationClusterProperties.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.models.AcsClusterProperties; +import com.azure.resourcemanager.machinelearningcompute.models.AppInsightsProperties; +import com.azure.resourcemanager.machinelearningcompute.models.ClusterType; +import com.azure.resourcemanager.machinelearningcompute.models.ContainerRegistryProperties; +import com.azure.resourcemanager.machinelearningcompute.models.GlobalServiceConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.OperationStatus; +import com.azure.resourcemanager.machinelearningcompute.models.StorageAccountProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Properties of an operationalization cluster. */ +@Fluent +public final class OperationalizationClusterProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationalizationClusterProperties.class); + + /* + * The description of the cluster. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The date and time when the cluster was created. + */ + @JsonProperty(value = "createdOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdOn; + + /* + * The date and time when the cluster was last modified. + */ + @JsonProperty(value = "modifiedOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime modifiedOn; + + /* + * The provision state of the cluster. Valid values are Unknown, Updating, + * Provisioning, Succeeded, and Failed. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus provisioningState; + + /* + * List of provisioning errors reported by the resource provider. + */ + @JsonProperty(value = "provisioningErrors", access = JsonProperty.Access.WRITE_ONLY) + private List provisioningErrors; + + /* + * The cluster type. + */ + @JsonProperty(value = "clusterType", required = true) + private ClusterType clusterType; + + /* + * Storage Account properties. + */ + @JsonProperty(value = "storageAccount") + private StorageAccountProperties storageAccount; + + /* + * Container Registry properties. + */ + @JsonProperty(value = "containerRegistry") + private ContainerRegistryProperties containerRegistry; + + /* + * Parameters for the Azure Container Service cluster. + */ + @JsonProperty(value = "containerService") + private AcsClusterProperties containerService; + + /* + * AppInsights configuration. + */ + @JsonProperty(value = "appInsights") + private AppInsightsProperties appInsights; + + /* + * Contains global configuration for the web services in the cluster. + */ + @JsonProperty(value = "globalServiceConfiguration") + private GlobalServiceConfiguration globalServiceConfiguration; + + /** + * Get the description property: The description of the cluster. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the cluster. + * + * @param description the description value to set. + * @return the OperationalizationClusterProperties object itself. + */ + public OperationalizationClusterProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdOn property: The date and time when the cluster was created. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.createdOn; + } + + /** + * Get the modifiedOn property: The date and time when the cluster was last modified. + * + * @return the modifiedOn value. + */ + public OffsetDateTime modifiedOn() { + return this.modifiedOn; + } + + /** + * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, + * Provisioning, Succeeded, and Failed. + * + * @return the provisioningState value. + */ + public OperationStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningErrors property: List of provisioning errors reported by the resource provider. + * + * @return the provisioningErrors value. + */ + public List provisioningErrors() { + return this.provisioningErrors; + } + + /** + * Get the clusterType property: The cluster type. + * + * @return the clusterType value. + */ + public ClusterType clusterType() { + return this.clusterType; + } + + /** + * Set the clusterType property: The cluster type. + * + * @param clusterType the clusterType value to set. + * @return the OperationalizationClusterProperties object itself. + */ + public OperationalizationClusterProperties withClusterType(ClusterType clusterType) { + this.clusterType = clusterType; + return this; + } + + /** + * Get the storageAccount property: Storage Account properties. + * + * @return the storageAccount value. + */ + public StorageAccountProperties storageAccount() { + return this.storageAccount; + } + + /** + * Set the storageAccount property: Storage Account properties. + * + * @param storageAccount the storageAccount value to set. + * @return the OperationalizationClusterProperties object itself. + */ + public OperationalizationClusterProperties withStorageAccount(StorageAccountProperties storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Get the containerRegistry property: Container Registry properties. + * + * @return the containerRegistry value. + */ + public ContainerRegistryProperties containerRegistry() { + return this.containerRegistry; + } + + /** + * Set the containerRegistry property: Container Registry properties. + * + * @param containerRegistry the containerRegistry value to set. + * @return the OperationalizationClusterProperties object itself. + */ + public OperationalizationClusterProperties withContainerRegistry(ContainerRegistryProperties containerRegistry) { + this.containerRegistry = containerRegistry; + return this; + } + + /** + * Get the containerService property: Parameters for the Azure Container Service cluster. + * + * @return the containerService value. + */ + public AcsClusterProperties containerService() { + return this.containerService; + } + + /** + * Set the containerService property: Parameters for the Azure Container Service cluster. + * + * @param containerService the containerService value to set. + * @return the OperationalizationClusterProperties object itself. + */ + public OperationalizationClusterProperties withContainerService(AcsClusterProperties containerService) { + this.containerService = containerService; + return this; + } + + /** + * Get the appInsights property: AppInsights configuration. + * + * @return the appInsights value. + */ + public AppInsightsProperties appInsights() { + return this.appInsights; + } + + /** + * Set the appInsights property: AppInsights configuration. + * + * @param appInsights the appInsights value to set. + * @return the OperationalizationClusterProperties object itself. + */ + public OperationalizationClusterProperties withAppInsights(AppInsightsProperties appInsights) { + this.appInsights = appInsights; + return this; + } + + /** + * Get the globalServiceConfiguration property: Contains global configuration for the web services in the cluster. + * + * @return the globalServiceConfiguration value. + */ + public GlobalServiceConfiguration globalServiceConfiguration() { + return this.globalServiceConfiguration; + } + + /** + * Set the globalServiceConfiguration property: Contains global configuration for the web services in the cluster. + * + * @param globalServiceConfiguration the globalServiceConfiguration value to set. + * @return the OperationalizationClusterProperties object itself. + */ + public OperationalizationClusterProperties withGlobalServiceConfiguration( + GlobalServiceConfiguration globalServiceConfiguration) { + this.globalServiceConfiguration = globalServiceConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clusterType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property clusterType in model OperationalizationClusterProperties")); + } + if (storageAccount() != null) { + storageAccount().validate(); + } + if (containerRegistry() != null) { + containerRegistry().validate(); + } + if (containerService() != null) { + containerService().validate(); + } + if (appInsights() != null) { + appInsights().validate(); + } + if (globalServiceConfiguration() != null) { + globalServiceConfiguration().validate(); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/UpdateSystemServicesResponseInner.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/UpdateSystemServicesResponseInner.java new file mode 100644 index 0000000000000..1217b8295a271 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/UpdateSystemServicesResponseInner.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.machinelearningcompute.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.models.OperationStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Response of the update system services API. */ +@Immutable +public final class UpdateSystemServicesResponseInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateSystemServicesResponseInner.class); + + /* + * Update status + */ + @JsonProperty(value = "updateStatus", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus updateStatus; + + /* + * The date and time when the last system services update was started. + */ + @JsonProperty(value = "updateStartedOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updateStartedOn; + + /* + * The date and time when the last system services update completed. + */ + @JsonProperty(value = "updateCompletedOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updateCompletedOn; + + /** + * Get the updateStatus property: Update status. + * + * @return the updateStatus value. + */ + public OperationStatus updateStatus() { + return this.updateStatus; + } + + /** + * Get the updateStartedOn property: The date and time when the last system services update was started. + * + * @return the updateStartedOn value. + */ + public OffsetDateTime updateStartedOn() { + return this.updateStartedOn; + } + + /** + * Get the updateCompletedOn property: The date and time when the last system services update completed. + * + * @return the updateCompletedOn value. + */ + public OffsetDateTime updateCompletedOn() { + return this.updateCompletedOn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/package-info.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/package-info.java new file mode 100644 index 0000000000000..baefb6d212109 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/models/package-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the inner data models for MachineLearningComputeManagementClient. These APIs allow end users to + * operate on Azure Machine Learning Compute resources. They support the following operations:<ul><li>Create + * or update a cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete + * a cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system + * services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in + * a resource group</li><li>Get all clusters in a subscription</li></ul>. + */ +package com.azure.resourcemanager.machinelearningcompute.fluent.models; diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/package-info.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/package-info.java new file mode 100644 index 0000000000000..eb41f76872aac --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/fluent/package-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the service clients for MachineLearningComputeManagementClient. These APIs allow end users to + * operate on Azure Machine Learning Compute resources. They support the following operations:<ul><li>Create + * or update a cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete + * a cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system + * services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in + * a resource group</li><li>Get all clusters in a subscription</li></ul>. + */ +package com.azure.resourcemanager.machinelearningcompute.fluent; diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/AvailableOperationsImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/AvailableOperationsImpl.java new file mode 100644 index 0000000000000..79a58517242c1 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/AvailableOperationsImpl.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.machinelearningcompute.implementation; + +import com.azure.resourcemanager.machinelearningcompute.fluent.models.AvailableOperationsInner; +import com.azure.resourcemanager.machinelearningcompute.models.AvailableOperations; +import com.azure.resourcemanager.machinelearningcompute.models.ResourceOperation; +import java.util.Collections; +import java.util.List; + +public final class AvailableOperationsImpl implements AvailableOperations { + private AvailableOperationsInner innerObject; + + private final com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager; + + AvailableOperationsImpl( + AvailableOperationsInner innerObject, + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AvailableOperationsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/CheckSystemServicesUpdatesAvailableResponseImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/CheckSystemServicesUpdatesAvailableResponseImpl.java new file mode 100644 index 0000000000000..a247946364b65 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/CheckSystemServicesUpdatesAvailableResponseImpl.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.implementation; + +import com.azure.resourcemanager.machinelearningcompute.fluent.models.CheckSystemServicesUpdatesAvailableResponseInner; +import com.azure.resourcemanager.machinelearningcompute.models.CheckSystemServicesUpdatesAvailableResponse; +import com.azure.resourcemanager.machinelearningcompute.models.UpdatesAvailable; + +public final class CheckSystemServicesUpdatesAvailableResponseImpl + implements CheckSystemServicesUpdatesAvailableResponse { + private CheckSystemServicesUpdatesAvailableResponseInner innerObject; + + private final com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager; + + CheckSystemServicesUpdatesAvailableResponseImpl( + CheckSystemServicesUpdatesAvailableResponseInner innerObject, + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public UpdatesAvailable updatesAvailable() { + return this.innerModel().updatesAvailable(); + } + + public CheckSystemServicesUpdatesAvailableResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputeManagementClientBuilder.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputeManagementClientBuilder.java new file mode 100644 index 0000000000000..a8ef782ca1722 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputeManagementClientBuilder.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.machinelearningcompute.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the MachineLearningComputeManagementClientImpl type. */ +@ServiceClientBuilder(serviceClients = {MachineLearningComputeManagementClientImpl.class}) +public final class MachineLearningComputeManagementClientBuilder { + /* + * The Azure subscription ID. + */ + private String subscriptionId; + + /** + * Sets The Azure subscription ID. + * + * @param subscriptionId the subscriptionId value. + * @return the MachineLearningComputeManagementClientBuilder. + */ + public MachineLearningComputeManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the MachineLearningComputeManagementClientBuilder. + */ + public MachineLearningComputeManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the MachineLearningComputeManagementClientBuilder. + */ + public MachineLearningComputeManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the MachineLearningComputeManagementClientBuilder. + */ + public MachineLearningComputeManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the MachineLearningComputeManagementClientBuilder. + */ + public MachineLearningComputeManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the MachineLearningComputeManagementClientBuilder. + */ + public MachineLearningComputeManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of MachineLearningComputeManagementClientImpl with the provided parameters. + * + * @return an instance of MachineLearningComputeManagementClientImpl. + */ + public MachineLearningComputeManagementClientImpl buildClient() { + if (endpoint == null) { + this.endpoint = "https://management.azure.com"; + } + if (environment == null) { + this.environment = AzureEnvironment.AZURE; + } + if (defaultPollInterval == null) { + this.defaultPollInterval = Duration.ofSeconds(30); + } + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); + } + MachineLearningComputeManagementClientImpl client = + new MachineLearningComputeManagementClientImpl( + pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + return client; + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputeManagementClientImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputeManagementClientImpl.java new file mode 100644 index 0000000000000..1102b5245aa56 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputeManagementClientImpl.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearningcompute.fluent.MachineLearningComputeManagementClient; +import com.azure.resourcemanager.machinelearningcompute.fluent.MachineLearningComputesClient; +import com.azure.resourcemanager.machinelearningcompute.fluent.OperationalizationClustersClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the MachineLearningComputeManagementClientImpl type. */ +@ServiceClient(builder = MachineLearningComputeManagementClientBuilder.class) +public final class MachineLearningComputeManagementClientImpl implements MachineLearningComputeManagementClient { + private final ClientLogger logger = new ClientLogger(MachineLearningComputeManagementClientImpl.class); + + /** The Azure subscription ID. */ + private final String subscriptionId; + + /** + * Gets The Azure subscription ID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The OperationalizationClustersClient object to access its operations. */ + private final OperationalizationClustersClient operationalizationClusters; + + /** + * Gets the OperationalizationClustersClient object to access its operations. + * + * @return the OperationalizationClustersClient object. + */ + public OperationalizationClustersClient getOperationalizationClusters() { + return this.operationalizationClusters; + } + + /** The MachineLearningComputesClient object to access its operations. */ + private final MachineLearningComputesClient machineLearningComputes; + + /** + * Gets the MachineLearningComputesClient object to access its operations. + * + * @return the MachineLearningComputesClient object. + */ + public MachineLearningComputesClient getMachineLearningComputes() { + return this.machineLearningComputes; + } + + /** + * Initializes an instance of MachineLearningComputeManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The Azure subscription ID. + * @param endpoint server parameter. + */ + MachineLearningComputeManagementClientImpl( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2017-08-01-preview"; + this.operationalizationClusters = new OperationalizationClustersClientImpl(this); + this.machineLearningComputes = new MachineLearningComputesClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + for (Map.Entry entry : this.getContext().getValues().entrySet()) { + context = context.addData(entry.getKey(), entry.getValue()); + } + return context; + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult( + Mono>> activationResponse, + HttpPipeline httpPipeline, + Type pollResultType, + Type finalResultType, + Context context) { + return PollerFactory + .create( + serializerAdapter, + httpPipeline, + pollResultType, + finalResultType, + defaultPollInterval, + activationResponse, + context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = + new HttpResponseImpl( + lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = + this + .getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + logger.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputesClientImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputesClientImpl.java new file mode 100644 index 0000000000000..7b478496ee0f6 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputesClientImpl.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.machinelearningcompute.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.fluent.MachineLearningComputesClient; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.AvailableOperationsInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in MachineLearningComputesClient. */ +public final class MachineLearningComputesClientImpl implements MachineLearningComputesClient { + private final ClientLogger logger = new ClientLogger(MachineLearningComputesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final MachineLearningComputesService service; + + /** The service client containing this operation class. */ + private final MachineLearningComputeManagementClientImpl client; + + /** + * Initializes an instance of MachineLearningComputesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MachineLearningComputesClientImpl(MachineLearningComputeManagementClientImpl client) { + this.service = + RestProxy + .create(MachineLearningComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningComputeManagementClientMachineLearningComputes to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MachineLearningCompu") + private interface MachineLearningComputesService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.MachineLearningCompute/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailableOperations( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets all available operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableOperationsWithResponseAsync() { + 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 + .listAvailableOperations( + this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all available operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableOperationsWithResponseAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listAvailableOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + } + + /** + * Gets all available operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAvailableOperationsAsync() { + return listAvailableOperationsWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets all available operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AvailableOperationsInner listAvailableOperations() { + return listAvailableOperationsAsync().block(); + } + + /** + * Gets all available operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAvailableOperationsWithResponse(Context context) { + return listAvailableOperationsWithResponseAsync(context).block(); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputesImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputesImpl.java new file mode 100644 index 0000000000000..5bff057370c43 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/MachineLearningComputesImpl.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.fluent.MachineLearningComputesClient; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.AvailableOperationsInner; +import com.azure.resourcemanager.machinelearningcompute.models.AvailableOperations; +import com.azure.resourcemanager.machinelearningcompute.models.MachineLearningComputes; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class MachineLearningComputesImpl implements MachineLearningComputes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MachineLearningComputesImpl.class); + + private final MachineLearningComputesClient innerClient; + + private final com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager; + + public MachineLearningComputesImpl( + MachineLearningComputesClient innerClient, + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public AvailableOperations listAvailableOperations() { + AvailableOperationsInner inner = this.serviceClient().listAvailableOperations(); + if (inner != null) { + return new AvailableOperationsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listAvailableOperationsWithResponse(Context context) { + Response inner = this.serviceClient().listAvailableOperationsWithResponse(context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AvailableOperationsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private MachineLearningComputesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClusterCredentialsImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClusterCredentialsImpl.java new file mode 100644 index 0000000000000..98d2938c0ad83 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClusterCredentialsImpl.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.machinelearningcompute.implementation; + +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterCredentialsInner; +import com.azure.resourcemanager.machinelearningcompute.models.AppInsightsCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.ContainerRegistryCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.ContainerServiceCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationClusterCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.ServiceAuthConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.SslConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.StorageAccountCredentials; + +public final class OperationalizationClusterCredentialsImpl implements OperationalizationClusterCredentials { + private OperationalizationClusterCredentialsInner innerObject; + + private final com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager; + + OperationalizationClusterCredentialsImpl( + OperationalizationClusterCredentialsInner innerObject, + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public StorageAccountCredentials storageAccount() { + return this.innerModel().storageAccount(); + } + + public ContainerRegistryCredentials containerRegistry() { + return this.innerModel().containerRegistry(); + } + + public ContainerServiceCredentials containerService() { + return this.innerModel().containerService(); + } + + public AppInsightsCredentials appInsights() { + return this.innerModel().appInsights(); + } + + public ServiceAuthConfiguration serviceAuthConfiguration() { + return this.innerModel().serviceAuthConfiguration(); + } + + public SslConfiguration sslConfiguration() { + return this.innerModel().sslConfiguration(); + } + + public OperationalizationClusterCredentialsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClusterImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClusterImpl.java new file mode 100644 index 0000000000000..1f202dab433d6 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClusterImpl.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterInner; +import com.azure.resourcemanager.machinelearningcompute.models.AcsClusterProperties; +import com.azure.resourcemanager.machinelearningcompute.models.AppInsightsProperties; +import com.azure.resourcemanager.machinelearningcompute.models.CheckSystemServicesUpdatesAvailableResponse; +import com.azure.resourcemanager.machinelearningcompute.models.ClusterType; +import com.azure.resourcemanager.machinelearningcompute.models.ContainerRegistryProperties; +import com.azure.resourcemanager.machinelearningcompute.models.GlobalServiceConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.OperationStatus; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationCluster; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationClusterCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationClusterUpdateParameters; +import com.azure.resourcemanager.machinelearningcompute.models.StorageAccountProperties; +import com.azure.resourcemanager.machinelearningcompute.models.UpdateSystemServicesResponse; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class OperationalizationClusterImpl + implements OperationalizationCluster, OperationalizationCluster.Definition, OperationalizationCluster.Update { + private OperationalizationClusterInner innerObject; + + private final com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager 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 String description() { + return this.innerModel().description(); + } + + public OffsetDateTime createdOn() { + return this.innerModel().createdOn(); + } + + public OffsetDateTime modifiedOn() { + return this.innerModel().modifiedOn(); + } + + public OperationStatus provisioningState() { + return this.innerModel().provisioningState(); + } + + public List provisioningErrors() { + List inner = this.innerModel().provisioningErrors(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ClusterType clusterType() { + return this.innerModel().clusterType(); + } + + public StorageAccountProperties storageAccount() { + return this.innerModel().storageAccount(); + } + + public ContainerRegistryProperties containerRegistry() { + return this.innerModel().containerRegistry(); + } + + public AcsClusterProperties containerService() { + return this.innerModel().containerService(); + } + + public AppInsightsProperties appInsights() { + return this.innerModel().appInsights(); + } + + public GlobalServiceConfiguration globalServiceConfiguration() { + return this.innerModel().globalServiceConfiguration(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public OperationalizationClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private OperationalizationClusterUpdateParameters updateParameters; + + public OperationalizationClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public OperationalizationCluster create() { + this.innerObject = + serviceManager + .serviceClient() + .getOperationalizationClusters() + .createOrUpdate(resourceGroupName, clusterName, this.innerModel(), Context.NONE); + return this; + } + + public OperationalizationCluster create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOperationalizationClusters() + .createOrUpdate(resourceGroupName, clusterName, this.innerModel(), context); + return this; + } + + OperationalizationClusterImpl( + String name, com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager) { + this.innerObject = new OperationalizationClusterInner(); + this.serviceManager = serviceManager; + this.clusterName = name; + } + + public OperationalizationClusterImpl update() { + this.updateParameters = new OperationalizationClusterUpdateParameters(); + return this; + } + + public OperationalizationCluster apply() { + this.innerObject = + serviceManager + .serviceClient() + .getOperationalizationClusters() + .updateWithResponse(resourceGroupName, clusterName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public OperationalizationCluster apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOperationalizationClusters() + .updateWithResponse(resourceGroupName, clusterName, updateParameters, context) + .getValue(); + return this; + } + + OperationalizationClusterImpl( + OperationalizationClusterInner innerObject, + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "operationalizationClusters"); + } + + public OperationalizationCluster refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getOperationalizationClusters() + .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE) + .getValue(); + return this; + } + + public OperationalizationCluster refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOperationalizationClusters() + .getByResourceGroupWithResponse(resourceGroupName, clusterName, context) + .getValue(); + return this; + } + + public OperationalizationClusterCredentials listKeys() { + return serviceManager.operationalizationClusters().listKeys(resourceGroupName, clusterName); + } + + public Response listKeysWithResponse(Context context) { + return serviceManager + .operationalizationClusters() + .listKeysWithResponse(resourceGroupName, clusterName, context); + } + + public CheckSystemServicesUpdatesAvailableResponse checkSystemServicesUpdatesAvailable() { + return serviceManager + .operationalizationClusters() + .checkSystemServicesUpdatesAvailable(resourceGroupName, clusterName); + } + + public Response checkSystemServicesUpdatesAvailableWithResponse( + Context context) { + return serviceManager + .operationalizationClusters() + .checkSystemServicesUpdatesAvailableWithResponse(resourceGroupName, clusterName, context); + } + + public UpdateSystemServicesResponse updateSystemServices() { + return serviceManager.operationalizationClusters().updateSystemServices(resourceGroupName, clusterName); + } + + public UpdateSystemServicesResponse updateSystemServices(Context context) { + return serviceManager + .operationalizationClusters() + .updateSystemServices(resourceGroupName, clusterName, context); + } + + public OperationalizationClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public OperationalizationClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public OperationalizationClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public OperationalizationClusterImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public OperationalizationClusterImpl withClusterType(ClusterType clusterType) { + this.innerModel().withClusterType(clusterType); + return this; + } + + public OperationalizationClusterImpl withStorageAccount(StorageAccountProperties storageAccount) { + this.innerModel().withStorageAccount(storageAccount); + return this; + } + + public OperationalizationClusterImpl withContainerRegistry(ContainerRegistryProperties containerRegistry) { + this.innerModel().withContainerRegistry(containerRegistry); + return this; + } + + public OperationalizationClusterImpl withContainerService(AcsClusterProperties containerService) { + this.innerModel().withContainerService(containerService); + return this; + } + + public OperationalizationClusterImpl withAppInsights(AppInsightsProperties appInsights) { + this.innerModel().withAppInsights(appInsights); + return this; + } + + public OperationalizationClusterImpl withGlobalServiceConfiguration( + GlobalServiceConfiguration globalServiceConfiguration) { + this.innerModel().withGlobalServiceConfiguration(globalServiceConfiguration); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClustersClientImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClustersClientImpl.java new file mode 100644 index 0000000000000..6e0d1350d6e17 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClustersClientImpl.java @@ -0,0 +1,2178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearningcompute.fluent.OperationalizationClustersClient; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.CheckSystemServicesUpdatesAvailableResponseInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterCredentialsInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.UpdateSystemServicesResponseInner; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationClusterUpdateParameters; +import com.azure.resourcemanager.machinelearningcompute.models.PaginatedOperationalizationClustersList; +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 OperationalizationClustersClient. */ +public final class OperationalizationClustersClientImpl implements OperationalizationClustersClient { + private final ClientLogger logger = new ClientLogger(OperationalizationClustersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OperationalizationClustersService service; + + /** The service client containing this operation class. */ + private final MachineLearningComputeManagementClientImpl client; + + /** + * Initializes an instance of OperationalizationClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationalizationClustersClientImpl(MachineLearningComputeManagementClientImpl client) { + this.service = + RestProxy + .create( + OperationalizationClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningComputeManagementClientOperationalizationClusters to + * be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MachineLearningCompu") + private interface OperationalizationClustersService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @BodyParam("application/json") OperationalizationClusterInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @BodyParam("application/json") OperationalizationClusterUpdateParameters parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @QueryParam("deleteAll") Boolean deleteAll, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}" + + "/checkSystemServicesUpdatesAvailable") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkSystemServicesUpdatesAvailable( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateSystemServices( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningCompute/operationalizationClusters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("$skiptoken") String skiptoken, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningCompute/operationalizationClusters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$skiptoken") String skiptoken, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionIdNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String clusterName, OperationalizationClusterInner 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String clusterName, OperationalizationClusterInner 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + parameters, + accept, + context); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationalizationClusterInner> + beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationalizationClusterInner.class, + OperationalizationClusterInner.class, + this.client.getContext()); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationalizationClusterInner> + beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationalizationClusterInner.class, + OperationalizationClusterInner.class, + context); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationalizationClusterInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationalizationClusterInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationalizationClusterInner createOrUpdate( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters) { + return createOrUpdateAsync(resourceGroupName, clusterName, parameters).block(); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationalizationClusterInner createOrUpdate( + String resourceGroupName, String clusterName, OperationalizationClusterInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, clusterName, parameters, context).block(); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + accept, + context); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationalizationClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupAsync(resourceGroupName, clusterName).block(); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String clusterName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other + * properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters The parameters supplied to patch the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String clusterName, OperationalizationClusterUpdateParameters 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other + * properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters The parameters supplied to patch the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String clusterName, + OperationalizationClusterUpdateParameters 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + parameters, + accept, + context); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other + * properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters The parameters supplied to patch the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String clusterName, OperationalizationClusterUpdateParameters parameters) { + return updateWithResponseAsync(resourceGroupName, clusterName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other + * properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters The parameters supplied to patch the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationalizationClusterInner update( + String resourceGroupName, String clusterName, OperationalizationClusterUpdateParameters parameters) { + return updateAsync(resourceGroupName, clusterName, parameters).block(); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other + * properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters The parameters supplied to patch the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return instance of an Azure ML Operationalization Cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String clusterName, + OperationalizationClusterUpdateParameters parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, clusterName, parameters, context).block(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String clusterName, Boolean deleteAll) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + deleteAll, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String clusterName, Boolean deleteAll, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + deleteAll, + accept, + context); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String clusterName, Boolean deleteAll) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, deleteAll); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String clusterName, Boolean deleteAll, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, clusterName, deleteAll, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String clusterName, Boolean deleteAll) { + return beginDeleteAsync(resourceGroupName, clusterName, deleteAll).getSyncPoller(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String clusterName, Boolean deleteAll, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, deleteAll, context).getSyncPoller(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, Boolean deleteAll) { + return beginDeleteAsync(resourceGroupName, clusterName, deleteAll) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName) { + final Boolean deleteAll = null; + return beginDeleteAsync(resourceGroupName, clusterName, deleteAll) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, Boolean deleteAll, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, deleteAll, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 clusterName, Boolean deleteAll) { + deleteAsync(resourceGroupName, clusterName, deleteAll).block(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 clusterName) { + final Boolean deleteAll = null; + deleteAsync(resourceGroupName, clusterName, deleteAll).block(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 clusterName, Boolean deleteAll, Context context) { + deleteAsync(resourceGroupName, clusterName, deleteAll, context).block(); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync( + String resourceGroupName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listKeys( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync( + String resourceGroupName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listKeys( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + accept, + context); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync( + String resourceGroupName, String clusterName) { + return listKeysWithResponseAsync(resourceGroupName, clusterName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationalizationClusterCredentialsInner listKeys(String resourceGroupName, String clusterName) { + return listKeysAsync(resourceGroupName, clusterName).block(); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse( + String resourceGroupName, String clusterName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + checkSystemServicesUpdatesAvailableWithResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkSystemServicesUpdatesAvailable( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + checkSystemServicesUpdatesAvailableWithResponseAsync( + String resourceGroupName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkSystemServicesUpdatesAvailable( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + accept, + context); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkSystemServicesUpdatesAvailableAsync( + String resourceGroupName, String clusterName) { + return checkSystemServicesUpdatesAvailableWithResponseAsync(resourceGroupName, clusterName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckSystemServicesUpdatesAvailableResponseInner checkSystemServicesUpdatesAvailable( + String resourceGroupName, String clusterName) { + return checkSystemServicesUpdatesAvailableAsync(resourceGroupName, clusterName).block(); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkSystemServicesUpdatesAvailableWithResponse( + String resourceGroupName, String clusterName, Context context) { + return checkSystemServicesUpdatesAvailableWithResponseAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateSystemServicesWithResponseAsync( + String resourceGroupName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSystemServices( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateSystemServicesWithResponseAsync( + String resourceGroupName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSystemServices( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + accept, + context); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UpdateSystemServicesResponseInner> + beginUpdateSystemServicesAsync(String resourceGroupName, String clusterName) { + Mono>> mono = updateSystemServicesWithResponseAsync(resourceGroupName, clusterName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + UpdateSystemServicesResponseInner.class, + UpdateSystemServicesResponseInner.class, + this.client.getContext()); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UpdateSystemServicesResponseInner> + beginUpdateSystemServicesAsync(String resourceGroupName, String clusterName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateSystemServicesWithResponseAsync(resourceGroupName, clusterName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + UpdateSystemServicesResponseInner.class, + UpdateSystemServicesResponseInner.class, + context); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UpdateSystemServicesResponseInner> + beginUpdateSystemServices(String resourceGroupName, String clusterName) { + return beginUpdateSystemServicesAsync(resourceGroupName, clusterName).getSyncPoller(); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UpdateSystemServicesResponseInner> + beginUpdateSystemServices(String resourceGroupName, String clusterName, Context context) { + return beginUpdateSystemServicesAsync(resourceGroupName, clusterName, context).getSyncPoller(); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSystemServicesAsync( + String resourceGroupName, String clusterName) { + return beginUpdateSystemServicesAsync(resourceGroupName, clusterName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSystemServicesAsync( + String resourceGroupName, String clusterName, Context context) { + return beginUpdateSystemServicesAsync(resourceGroupName, clusterName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateSystemServicesResponseInner updateSystemServices(String resourceGroupName, String clusterName) { + return updateSystemServicesAsync(resourceGroupName, clusterName).block(); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateSystemServicesResponseInner updateSystemServices( + String resourceGroupName, String clusterName, Context context) { + return updateSystemServicesAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String skiptoken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + skiptoken, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String skiptoken, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + skiptoken, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, String skiptoken) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String skiptoken = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, String skiptoken, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String skiptoken = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken)); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup( + String resourceGroupName, String skiptoken, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken, context)); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String skiptoken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + skiptoken, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String skiptoken, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + skiptoken, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skiptoken) { + return new PagedFlux<>( + () -> listSinglePageAsync(skiptoken), nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink)); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String skiptoken = null; + return new PagedFlux<>( + () -> listSinglePageAsync(skiptoken), nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink)); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skiptoken, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(skiptoken, context), + nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String skiptoken = null; + return new PagedIterable<>(listAsync(skiptoken)); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String skiptoken, Context context) { + return new PagedIterable<>(listAsync(skiptoken, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paginated list of operationalization clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paginated list of operationalization clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paginated list of operationalization clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionIdNextSinglePageAsync( + 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.listBySubscriptionIdNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paginated list of operationalization clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionIdNextSinglePageAsync( + 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 + .listBySubscriptionIdNext(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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClustersImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClustersImpl.java new file mode 100644 index 0000000000000..80e2f045f9749 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/OperationalizationClustersImpl.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.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.machinelearningcompute.fluent.OperationalizationClustersClient; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.CheckSystemServicesUpdatesAvailableResponseInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterCredentialsInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterInner; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.UpdateSystemServicesResponseInner; +import com.azure.resourcemanager.machinelearningcompute.models.CheckSystemServicesUpdatesAvailableResponse; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationCluster; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationClusterCredentials; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationClusters; +import com.azure.resourcemanager.machinelearningcompute.models.UpdateSystemServicesResponse; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OperationalizationClustersImpl implements OperationalizationClusters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationalizationClustersImpl.class); + + private final OperationalizationClustersClient innerClient; + + private final com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager; + + public OperationalizationClustersImpl( + OperationalizationClustersClient innerClient, + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public OperationalizationCluster getByResourceGroup(String resourceGroupName, String clusterName) { + OperationalizationClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); + if (inner != null) { + return new OperationalizationClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String clusterName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OperationalizationClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, Boolean deleteAll) { + this.serviceClient().delete(resourceGroupName, clusterName, deleteAll); + } + + public void delete(String resourceGroupName, String clusterName) { + this.serviceClient().delete(resourceGroupName, clusterName); + } + + public void delete(String resourceGroupName, String clusterName, Boolean deleteAll, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, deleteAll, context); + } + + public OperationalizationClusterCredentials listKeys(String resourceGroupName, String clusterName) { + OperationalizationClusterCredentialsInner inner = this.serviceClient().listKeys(resourceGroupName, clusterName); + if (inner != null) { + return new OperationalizationClusterCredentialsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listKeysWithResponse( + String resourceGroupName, String clusterName, Context context) { + Response inner = + this.serviceClient().listKeysWithResponse(resourceGroupName, clusterName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OperationalizationClusterCredentialsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CheckSystemServicesUpdatesAvailableResponse checkSystemServicesUpdatesAvailable( + String resourceGroupName, String clusterName) { + CheckSystemServicesUpdatesAvailableResponseInner inner = + this.serviceClient().checkSystemServicesUpdatesAvailable(resourceGroupName, clusterName); + if (inner != null) { + return new CheckSystemServicesUpdatesAvailableResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkSystemServicesUpdatesAvailableWithResponse( + String resourceGroupName, String clusterName, Context context) { + Response inner = + this + .serviceClient() + .checkSystemServicesUpdatesAvailableWithResponse(resourceGroupName, clusterName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CheckSystemServicesUpdatesAvailableResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UpdateSystemServicesResponse updateSystemServices(String resourceGroupName, String clusterName) { + UpdateSystemServicesResponseInner inner = + this.serviceClient().updateSystemServices(resourceGroupName, clusterName); + if (inner != null) { + return new UpdateSystemServicesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public UpdateSystemServicesResponse updateSystemServices( + String resourceGroupName, String clusterName, Context context) { + UpdateSystemServicesResponseInner inner = + this.serviceClient().updateSystemServices(resourceGroupName, clusterName, context); + if (inner != null) { + return new UpdateSystemServicesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new OperationalizationClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup( + String resourceGroupName, String skiptoken, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, skiptoken, context); + return Utils.mapPage(inner, inner1 -> new OperationalizationClusterImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationalizationClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(String skiptoken, Context context) { + PagedIterable inner = this.serviceClient().list(skiptoken, context); + return Utils.mapPage(inner, inner1 -> new OperationalizationClusterImpl(inner1, this.manager())); + } + + public OperationalizationCluster 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 clusterName = Utils.getValueFromIdByName(id, "operationalizationClusters"); + if (clusterName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'operationalizationClusters'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, 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 clusterName = Utils.getValueFromIdByName(id, "operationalizationClusters"); + if (clusterName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'operationalizationClusters'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, 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 clusterName = Utils.getValueFromIdByName(id, "operationalizationClusters"); + if (clusterName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'operationalizationClusters'.", + id))); + } + Boolean localDeleteAll = null; + this.delete(resourceGroupName, clusterName, localDeleteAll, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Boolean deleteAll, 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 clusterName = Utils.getValueFromIdByName(id, "operationalizationClusters"); + if (clusterName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'operationalizationClusters'.", + id))); + } + this.delete(resourceGroupName, clusterName, deleteAll, context); + } + + private OperationalizationClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager() { + return this.serviceManager; + } + + public OperationalizationClusterImpl define(String name) { + return new OperationalizationClusterImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/UpdateSystemServicesResponseImpl.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/UpdateSystemServicesResponseImpl.java new file mode 100644 index 0000000000000..5d5318ca49319 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/UpdateSystemServicesResponseImpl.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.implementation; + +import com.azure.resourcemanager.machinelearningcompute.fluent.models.UpdateSystemServicesResponseInner; +import com.azure.resourcemanager.machinelearningcompute.models.OperationStatus; +import com.azure.resourcemanager.machinelearningcompute.models.UpdateSystemServicesResponse; +import java.time.OffsetDateTime; + +public final class UpdateSystemServicesResponseImpl implements UpdateSystemServicesResponse { + private UpdateSystemServicesResponseInner innerObject; + + private final com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager; + + UpdateSystemServicesResponseImpl( + UpdateSystemServicesResponseInner innerObject, + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public OperationStatus updateStatus() { + return this.innerModel().updateStatus(); + } + + public OffsetDateTime updateStartedOn() { + return this.innerModel().updateStartedOn(); + } + + public OffsetDateTime updateCompletedOn() { + return this.innerModel().updateCompletedOn(); + } + + public UpdateSystemServicesResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/Utils.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/Utils.java new file mode 100644 index 0000000000000..80e20083a996a --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/Utils.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.machinelearningcompute.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class Utils { + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (segments.size() > 0 && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super( + PagedFlux + .create( + () -> + (continuationToken, pageSize) -> + Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> + new PagedResponseBase( + page.getRequest(), + page.getStatusCode(), + page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), + page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/package-info.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/package-info.java new file mode 100644 index 0000000000000..88c1f5ccf6788 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/implementation/package-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for MachineLearningComputeManagementClient. These APIs allow end users to + * operate on Azure Machine Learning Compute resources. They support the following operations:<ul><li>Create + * or update a cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete + * a cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system + * services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in + * a resource group</li><li>Get all clusters in a subscription</li></ul>. + */ +package com.azure.resourcemanager.machinelearningcompute.implementation; diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AcsClusterProperties.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AcsClusterProperties.java new file mode 100644 index 0000000000000..ff474d72a1d69 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AcsClusterProperties.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Information about the container service backing the cluster. */ +@Fluent +public final class AcsClusterProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AcsClusterProperties.class); + + /* + * The FQDN of the cluster. + */ + @JsonProperty(value = "clusterFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String clusterFqdn; + + /* + * Type of orchestrator. It cannot be changed once the cluster is created. + */ + @JsonProperty(value = "orchestratorType", required = true) + private OrchestratorType orchestratorType; + + /* + * Orchestrator specific properties + */ + @JsonProperty(value = "orchestratorProperties") + private KubernetesClusterProperties orchestratorProperties; + + /* + * The system services deployed to the cluster + */ + @JsonProperty(value = "systemServices") + private List systemServices; + + /* + * The number of master nodes in the container service. + */ + @JsonProperty(value = "masterCount") + private Integer masterCount; + + /* + * The number of agent nodes in the Container Service. This can be changed + * to scale the cluster. + */ + @JsonProperty(value = "agentCount") + private Integer agentCount; + + /* + * The Azure VM size of the agent VM nodes. This cannot be changed once the + * cluster is created. This list is non exhaustive; refer to + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes + * for the possible VM sizes. + */ + @JsonProperty(value = "agentVmSize") + private AgentVMSizeTypes agentVmSize; + + /** + * Get the clusterFqdn property: The FQDN of the cluster. + * + * @return the clusterFqdn value. + */ + public String clusterFqdn() { + return this.clusterFqdn; + } + + /** + * Get the orchestratorType property: Type of orchestrator. It cannot be changed once the cluster is created. + * + * @return the orchestratorType value. + */ + public OrchestratorType orchestratorType() { + return this.orchestratorType; + } + + /** + * Set the orchestratorType property: Type of orchestrator. It cannot be changed once the cluster is created. + * + * @param orchestratorType the orchestratorType value to set. + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withOrchestratorType(OrchestratorType orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get the orchestratorProperties property: Orchestrator specific properties. + * + * @return the orchestratorProperties value. + */ + public KubernetesClusterProperties orchestratorProperties() { + return this.orchestratorProperties; + } + + /** + * Set the orchestratorProperties property: Orchestrator specific properties. + * + * @param orchestratorProperties the orchestratorProperties value to set. + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withOrchestratorProperties(KubernetesClusterProperties orchestratorProperties) { + this.orchestratorProperties = orchestratorProperties; + return this; + } + + /** + * Get the systemServices property: The system services deployed to the cluster. + * + * @return the systemServices value. + */ + public List systemServices() { + return this.systemServices; + } + + /** + * Set the systemServices property: The system services deployed to the cluster. + * + * @param systemServices the systemServices value to set. + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withSystemServices(List systemServices) { + this.systemServices = systemServices; + return this; + } + + /** + * Get the masterCount property: The number of master nodes in the container service. + * + * @return the masterCount value. + */ + public Integer masterCount() { + return this.masterCount; + } + + /** + * Set the masterCount property: The number of master nodes in the container service. + * + * @param masterCount the masterCount value to set. + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withMasterCount(Integer masterCount) { + this.masterCount = masterCount; + return this; + } + + /** + * Get the agentCount property: The number of agent nodes in the Container Service. This can be changed to scale the + * cluster. + * + * @return the agentCount value. + */ + public Integer agentCount() { + return this.agentCount; + } + + /** + * Set the agentCount property: The number of agent nodes in the Container Service. This can be changed to scale the + * cluster. + * + * @param agentCount the agentCount value to set. + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withAgentCount(Integer agentCount) { + this.agentCount = agentCount; + return this; + } + + /** + * Get the agentVmSize property: The Azure VM size of the agent VM nodes. This cannot be changed once the cluster is + * created. This list is non exhaustive; refer to + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes for the possible VM sizes. + * + * @return the agentVmSize value. + */ + public AgentVMSizeTypes agentVmSize() { + return this.agentVmSize; + } + + /** + * Set the agentVmSize property: The Azure VM size of the agent VM nodes. This cannot be changed once the cluster is + * created. This list is non exhaustive; refer to + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes for the possible VM sizes. + * + * @param agentVmSize the agentVmSize value to set. + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withAgentVmSize(AgentVMSizeTypes agentVmSize) { + this.agentVmSize = agentVmSize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (orchestratorType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property orchestratorType in model AcsClusterProperties")); + } + if (orchestratorProperties() != null) { + orchestratorProperties().validate(); + } + if (systemServices() != null) { + systemServices().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AgentVMSizeTypes.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AgentVMSizeTypes.java new file mode 100644 index 0000000000000..4b1814b73a3fc --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AgentVMSizeTypes.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AgentVMSizeTypes. */ +public final class AgentVMSizeTypes extends ExpandableStringEnum { + /** Static value Standard_A0 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A0 = fromString("Standard_A0"); + + /** Static value Standard_A1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A1 = fromString("Standard_A1"); + + /** Static value Standard_A2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A2 = fromString("Standard_A2"); + + /** Static value Standard_A3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A3 = fromString("Standard_A3"); + + /** Static value Standard_A4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A4 = fromString("Standard_A4"); + + /** Static value Standard_A5 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A5 = fromString("Standard_A5"); + + /** Static value Standard_A6 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A6 = fromString("Standard_A6"); + + /** Static value Standard_A7 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A7 = fromString("Standard_A7"); + + /** Static value Standard_A8 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A8 = fromString("Standard_A8"); + + /** Static value Standard_A9 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A9 = fromString("Standard_A9"); + + /** Static value Standard_A10 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A10 = fromString("Standard_A10"); + + /** Static value Standard_A11 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A11 = fromString("Standard_A11"); + + /** Static value Standard_D1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D1 = fromString("Standard_D1"); + + /** Static value Standard_D2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D2 = fromString("Standard_D2"); + + /** Static value Standard_D3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D3 = fromString("Standard_D3"); + + /** Static value Standard_D4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D4 = fromString("Standard_D4"); + + /** Static value Standard_D11 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D11 = fromString("Standard_D11"); + + /** Static value Standard_D12 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D12 = fromString("Standard_D12"); + + /** Static value Standard_D13 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D13 = fromString("Standard_D13"); + + /** Static value Standard_D14 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D14 = fromString("Standard_D14"); + + /** Static value Standard_D1_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D1_V2 = fromString("Standard_D1_v2"); + + /** Static value Standard_D2_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D2_V2 = fromString("Standard_D2_v2"); + + /** Static value Standard_D3_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D3_V2 = fromString("Standard_D3_v2"); + + /** Static value Standard_D4_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D4_V2 = fromString("Standard_D4_v2"); + + /** Static value Standard_D5_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D5_V2 = fromString("Standard_D5_v2"); + + /** Static value Standard_D11_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D11_V2 = fromString("Standard_D11_v2"); + + /** Static value Standard_D12_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D12_V2 = fromString("Standard_D12_v2"); + + /** Static value Standard_D13_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D13_V2 = fromString("Standard_D13_v2"); + + /** Static value Standard_D14_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D14_V2 = fromString("Standard_D14_v2"); + + /** Static value Standard_G1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G1 = fromString("Standard_G1"); + + /** Static value Standard_G2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G2 = fromString("Standard_G2"); + + /** Static value Standard_G3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G3 = fromString("Standard_G3"); + + /** Static value Standard_G4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G4 = fromString("Standard_G4"); + + /** Static value Standard_G5 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G5 = fromString("Standard_G5"); + + /** Static value Standard_DS1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS1 = fromString("Standard_DS1"); + + /** Static value Standard_DS2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS2 = fromString("Standard_DS2"); + + /** Static value Standard_DS3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS3 = fromString("Standard_DS3"); + + /** Static value Standard_DS4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS4 = fromString("Standard_DS4"); + + /** Static value Standard_DS11 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS11 = fromString("Standard_DS11"); + + /** Static value Standard_DS12 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS12 = fromString("Standard_DS12"); + + /** Static value Standard_DS13 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS13 = fromString("Standard_DS13"); + + /** Static value Standard_DS14 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS14 = fromString("Standard_DS14"); + + /** Static value Standard_GS1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS1 = fromString("Standard_GS1"); + + /** Static value Standard_GS2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS2 = fromString("Standard_GS2"); + + /** Static value Standard_GS3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS3 = fromString("Standard_GS3"); + + /** Static value Standard_GS4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS4 = fromString("Standard_GS4"); + + /** Static value Standard_GS5 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS5 = fromString("Standard_GS5"); + + /** + * Creates or finds a AgentVMSizeTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentVMSizeTypes. + */ + @JsonCreator + public static AgentVMSizeTypes fromString(String name) { + return fromString(name, AgentVMSizeTypes.class); + } + + /** @return known AgentVMSizeTypes values. */ + public static Collection values() { + return values(AgentVMSizeTypes.class); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AppInsightsCredentials.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AppInsightsCredentials.java new file mode 100644 index 0000000000000..e6e80c8ce34ed --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AppInsightsCredentials.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** AppInsights credentials. */ +@Fluent +public final class AppInsightsCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppInsightsCredentials.class); + + /* + * The AppInsights application ID. + */ + @JsonProperty(value = "appId") + private String appId; + + /* + * The AppInsights instrumentation key. This is not returned in response of + * GET/PUT on the resource. To see this please call listKeys API. + */ + @JsonProperty(value = "instrumentationKey") + private String instrumentationKey; + + /** + * Get the appId property: The AppInsights application ID. + * + * @return the appId value. + */ + public String appId() { + return this.appId; + } + + /** + * Set the appId property: The AppInsights application ID. + * + * @param appId the appId value to set. + * @return the AppInsightsCredentials object itself. + */ + public AppInsightsCredentials withAppId(String appId) { + this.appId = appId; + return this; + } + + /** + * Get the instrumentationKey property: The AppInsights instrumentation key. This is not returned in response of + * GET/PUT on the resource. To see this please call listKeys API. + * + * @return the instrumentationKey value. + */ + public String instrumentationKey() { + return this.instrumentationKey; + } + + /** + * Set the instrumentationKey property: The AppInsights instrumentation key. This is not returned in response of + * GET/PUT on the resource. To see this please call listKeys API. + * + * @param instrumentationKey the instrumentationKey value to set. + * @return the AppInsightsCredentials object itself. + */ + public AppInsightsCredentials withInstrumentationKey(String instrumentationKey) { + this.instrumentationKey = instrumentationKey; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AppInsightsProperties.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AppInsightsProperties.java new file mode 100644 index 0000000000000..86088e85a6710 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AppInsightsProperties.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of App Insights. */ +@Fluent +public final class AppInsightsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppInsightsProperties.class); + + /* + * ARM resource ID of the App Insights. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get the resourceId property: ARM resource ID of the App Insights. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: ARM resource ID of the App Insights. + * + * @param resourceId the resourceId value to set. + * @return the AppInsightsProperties object itself. + */ + public AppInsightsProperties 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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AutoScaleConfiguration.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AutoScaleConfiguration.java new file mode 100644 index 0000000000000..b5be18e3c472f --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AutoScaleConfiguration.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** AutoScale configuration properties. */ +@Fluent +public final class AutoScaleConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoScaleConfiguration.class); + + /* + * If auto-scale is enabled for all services. Each service can turn it off + * individually. + */ + @JsonProperty(value = "status") + private Status status; + + /* + * The minimum number of replicas for each service. + */ + @JsonProperty(value = "minReplicas") + private Integer minReplicas; + + /* + * The maximum number of replicas for each service. + */ + @JsonProperty(value = "maxReplicas") + private Integer maxReplicas; + + /* + * The target utilization. + */ + @JsonProperty(value = "targetUtilization") + private Float targetUtilization; + + /* + * Refresh period in seconds. + */ + @JsonProperty(value = "refreshPeriodInSeconds") + private Integer refreshPeriodInSeconds; + + /** + * Get the status property: If auto-scale is enabled for all services. Each service can turn it off individually. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Set the status property: If auto-scale is enabled for all services. Each service can turn it off individually. + * + * @param status the status value to set. + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withStatus(Status status) { + this.status = status; + return this; + } + + /** + * Get the minReplicas property: The minimum number of replicas for each service. + * + * @return the minReplicas value. + */ + public Integer minReplicas() { + return this.minReplicas; + } + + /** + * Set the minReplicas property: The minimum number of replicas for each service. + * + * @param minReplicas the minReplicas value to set. + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withMinReplicas(Integer minReplicas) { + this.minReplicas = minReplicas; + return this; + } + + /** + * Get the maxReplicas property: The maximum number of replicas for each service. + * + * @return the maxReplicas value. + */ + public Integer maxReplicas() { + return this.maxReplicas; + } + + /** + * Set the maxReplicas property: The maximum number of replicas for each service. + * + * @param maxReplicas the maxReplicas value to set. + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withMaxReplicas(Integer maxReplicas) { + this.maxReplicas = maxReplicas; + return this; + } + + /** + * Get the targetUtilization property: The target utilization. + * + * @return the targetUtilization value. + */ + public Float targetUtilization() { + return this.targetUtilization; + } + + /** + * Set the targetUtilization property: The target utilization. + * + * @param targetUtilization the targetUtilization value to set. + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withTargetUtilization(Float targetUtilization) { + this.targetUtilization = targetUtilization; + return this; + } + + /** + * Get the refreshPeriodInSeconds property: Refresh period in seconds. + * + * @return the refreshPeriodInSeconds value. + */ + public Integer refreshPeriodInSeconds() { + return this.refreshPeriodInSeconds; + } + + /** + * Set the refreshPeriodInSeconds property: Refresh period in seconds. + * + * @param refreshPeriodInSeconds the refreshPeriodInSeconds value to set. + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withRefreshPeriodInSeconds(Integer refreshPeriodInSeconds) { + this.refreshPeriodInSeconds = refreshPeriodInSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AvailableOperations.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AvailableOperations.java new file mode 100644 index 0000000000000..3f75e66971c38 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/AvailableOperations.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.machinelearningcompute.models; + +import com.azure.resourcemanager.machinelearningcompute.fluent.models.AvailableOperationsInner; +import java.util.List; + +/** An immutable client-side representation of AvailableOperations. */ +public interface AvailableOperations { + /** + * Gets the value property: An array of available operations. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningcompute.fluent.models.AvailableOperationsInner object. + * + * @return the inner object. + */ + AvailableOperationsInner innerModel(); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/CheckSystemServicesUpdatesAvailableResponse.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/CheckSystemServicesUpdatesAvailableResponse.java new file mode 100644 index 0000000000000..2c44ce5111b6e --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/CheckSystemServicesUpdatesAvailableResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.resourcemanager.machinelearningcompute.fluent.models.CheckSystemServicesUpdatesAvailableResponseInner; + +/** An immutable client-side representation of CheckSystemServicesUpdatesAvailableResponse. */ +public interface CheckSystemServicesUpdatesAvailableResponse { + /** + * Gets the updatesAvailable property: Yes if updates are available for the system services, No if not. + * + * @return the updatesAvailable value. + */ + UpdatesAvailable updatesAvailable(); + + /** + * Gets the inner + * com.azure.resourcemanager.machinelearningcompute.fluent.models.CheckSystemServicesUpdatesAvailableResponseInner + * object. + * + * @return the inner object. + */ + CheckSystemServicesUpdatesAvailableResponseInner innerModel(); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ClusterType.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ClusterType.java new file mode 100644 index 0000000000000..223c296b6a70c --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ClusterType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ClusterType. */ +public final class ClusterType extends ExpandableStringEnum { + /** Static value ACS for ClusterType. */ + public static final ClusterType ACS = fromString("ACS"); + + /** Static value Local for ClusterType. */ + public static final ClusterType LOCAL = fromString("Local"); + + /** + * Creates or finds a ClusterType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterType. + */ + @JsonCreator + public static ClusterType fromString(String name) { + return fromString(name, ClusterType.class); + } + + /** @return known ClusterType values. */ + public static Collection values() { + return values(ClusterType.class); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerRegistryCredentials.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerRegistryCredentials.java new file mode 100644 index 0000000000000..e2374e87ef434 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerRegistryCredentials.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information about the Azure Container Registry which contains the images deployed to the cluster. */ +@Immutable +public final class ContainerRegistryCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerRegistryCredentials.class); + + /* + * The ACR login server name. User name is the first part of the FQDN. + */ + @JsonProperty(value = "loginServer", access = JsonProperty.Access.WRITE_ONLY) + private String loginServer; + + /* + * The ACR primary password. + */ + @JsonProperty(value = "password", access = JsonProperty.Access.WRITE_ONLY) + private String password; + + /* + * The ACR secondary password. + */ + @JsonProperty(value = "password2", access = JsonProperty.Access.WRITE_ONLY) + private String password2; + + /* + * The ACR login username. + */ + @JsonProperty(value = "username", access = JsonProperty.Access.WRITE_ONLY) + private String username; + + /** + * Get the loginServer property: The ACR login server name. User name is the first part of the FQDN. + * + * @return the loginServer value. + */ + public String loginServer() { + return this.loginServer; + } + + /** + * Get the password property: The ACR primary password. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Get the password2 property: The ACR secondary password. + * + * @return the password2 value. + */ + public String password2() { + return this.password2; + } + + /** + * Get the username property: The ACR login username. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerRegistryProperties.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerRegistryProperties.java new file mode 100644 index 0000000000000..4cda6ec7370c6 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerRegistryProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of Azure Container Registry. */ +@Fluent +public final class ContainerRegistryProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerRegistryProperties.class); + + /* + * ARM resource ID of the Azure Container Registry used to store Docker + * images for web services in the cluster. If not provided one will be + * created. This cannot be changed once the cluster is created. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get the resourceId property: ARM resource ID of the Azure Container Registry used to store Docker images for web + * services in the cluster. If not provided one will be created. This cannot be changed once the cluster is created. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: ARM resource ID of the Azure Container Registry used to store Docker images for web + * services in the cluster. If not provided one will be created. This cannot be changed once the cluster is created. + * + * @param resourceId the resourceId value to set. + * @return the ContainerRegistryProperties object itself. + */ + public ContainerRegistryProperties 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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerServiceCredentials.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerServiceCredentials.java new file mode 100644 index 0000000000000..2e09a1bcee021 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ContainerServiceCredentials.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information about the Azure Container Registry which contains the images deployed to the cluster. */ +@Immutable +public final class ContainerServiceCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerServiceCredentials.class); + + /* + * The ACS kube config file. + */ + @JsonProperty(value = "acsKubeConfig", access = JsonProperty.Access.WRITE_ONLY) + private String acsKubeConfig; + + /* + * Service principal configuration used by Kubernetes. + */ + @JsonProperty(value = "servicePrincipalConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private ServicePrincipalProperties servicePrincipalConfiguration; + + /* + * The ACR image pull secret name which was created in Kubernetes. + */ + @JsonProperty(value = "imagePullSecretName", access = JsonProperty.Access.WRITE_ONLY) + private String imagePullSecretName; + + /** + * Get the acsKubeConfig property: The ACS kube config file. + * + * @return the acsKubeConfig value. + */ + public String acsKubeConfig() { + return this.acsKubeConfig; + } + + /** + * Get the servicePrincipalConfiguration property: Service principal configuration used by Kubernetes. + * + * @return the servicePrincipalConfiguration value. + */ + public ServicePrincipalProperties servicePrincipalConfiguration() { + return this.servicePrincipalConfiguration; + } + + /** + * Get the imagePullSecretName property: The ACR image pull secret name which was created in Kubernetes. + * + * @return the imagePullSecretName value. + */ + public String imagePullSecretName() { + return this.imagePullSecretName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (servicePrincipalConfiguration() != null) { + servicePrincipalConfiguration().validate(); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/GlobalServiceConfiguration.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/GlobalServiceConfiguration.java new file mode 100644 index 0000000000000..c9ac785b19ad1 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/GlobalServiceConfiguration.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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; + +/** Global configuration for services in the cluster. */ +@Fluent +public final class GlobalServiceConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalServiceConfiguration.class); + + /* + * The configuration ETag for updates. + */ + @JsonProperty(value = "etag") + private String etag; + + /* + * The SSL configuration properties + */ + @JsonProperty(value = "ssl") + private SslConfiguration ssl; + + /* + * Optional global authorization keys for all user services deployed in + * cluster. These are used if the service does not have auth keys. + */ + @JsonProperty(value = "serviceAuth") + private ServiceAuthConfiguration serviceAuth; + + /* + * The auto-scale configuration + */ + @JsonProperty(value = "autoScale") + private AutoScaleConfiguration autoScale; + + /* + * Global configuration for services in the cluster. + */ + @JsonIgnore private Map additionalProperties; + + /** + * Get the etag property: The configuration ETag for updates. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag property: The configuration ETag for updates. + * + * @param etag the etag value to set. + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the ssl property: The SSL configuration properties. + * + * @return the ssl value. + */ + public SslConfiguration ssl() { + return this.ssl; + } + + /** + * Set the ssl property: The SSL configuration properties. + * + * @param ssl the ssl value to set. + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withSsl(SslConfiguration ssl) { + this.ssl = ssl; + return this; + } + + /** + * Get the serviceAuth property: Optional global authorization keys for all user services deployed in cluster. These + * are used if the service does not have auth keys. + * + * @return the serviceAuth value. + */ + public ServiceAuthConfiguration serviceAuth() { + return this.serviceAuth; + } + + /** + * Set the serviceAuth property: Optional global authorization keys for all user services deployed in cluster. These + * are used if the service does not have auth keys. + * + * @param serviceAuth the serviceAuth value to set. + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withServiceAuth(ServiceAuthConfiguration serviceAuth) { + this.serviceAuth = serviceAuth; + return this; + } + + /** + * Get the autoScale property: The auto-scale configuration. + * + * @return the autoScale value. + */ + public AutoScaleConfiguration autoScale() { + return this.autoScale; + } + + /** + * Set the autoScale property: The auto-scale configuration. + * + * @param autoScale the autoScale value to set. + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withAutoScale(AutoScaleConfiguration autoScale) { + this.autoScale = autoScale; + return this; + } + + /** + * Get the additionalProperties property: Global configuration for services in the cluster. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Global configuration for services in the cluster. + * + * @param additionalProperties the additionalProperties value to set. + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration 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 (ssl() != null) { + ssl().validate(); + } + if (serviceAuth() != null) { + serviceAuth().validate(); + } + if (autoScale() != null) { + autoScale().validate(); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/KubernetesClusterProperties.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/KubernetesClusterProperties.java new file mode 100644 index 0000000000000..435a87dbe1602 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/KubernetesClusterProperties.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes cluster specific properties. */ +@Fluent +public final class KubernetesClusterProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesClusterProperties.class); + + /* + * The Azure Service Principal used by Kubernetes + */ + @JsonProperty(value = "servicePrincipal") + private ServicePrincipalProperties servicePrincipal; + + /** + * Get the servicePrincipal property: The Azure Service Principal used by Kubernetes. + * + * @return the servicePrincipal value. + */ + public ServicePrincipalProperties servicePrincipal() { + return this.servicePrincipal; + } + + /** + * Set the servicePrincipal property: The Azure Service Principal used by Kubernetes. + * + * @param servicePrincipal the servicePrincipal value to set. + * @return the KubernetesClusterProperties object itself. + */ + public KubernetesClusterProperties withServicePrincipal(ServicePrincipalProperties servicePrincipal) { + this.servicePrincipal = servicePrincipal; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (servicePrincipal() != null) { + servicePrincipal().validate(); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/MachineLearningComputes.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/MachineLearningComputes.java new file mode 100644 index 0000000000000..224619acf856a --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/MachineLearningComputes.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.machinelearningcompute.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of MachineLearningComputes. */ +public interface MachineLearningComputes { + /** + * Gets all available operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + AvailableOperations listAvailableOperations(); + + /** + * Gets all available operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available operations. + */ + Response listAvailableOperationsWithResponse(Context context); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationStatus.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationStatus.java new file mode 100644 index 0000000000000..110a0c0e7c8c9 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationStatus.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OperationStatus. */ +public final class OperationStatus extends ExpandableStringEnum { + /** Static value Unknown for OperationStatus. */ + public static final OperationStatus UNKNOWN = fromString("Unknown"); + + /** Static value Updating for OperationStatus. */ + public static final OperationStatus UPDATING = fromString("Updating"); + + /** Static value Creating for OperationStatus. */ + public static final OperationStatus CREATING = fromString("Creating"); + + /** Static value Deleting for OperationStatus. */ + public static final OperationStatus DELETING = fromString("Deleting"); + + /** Static value Succeeded for OperationStatus. */ + public static final OperationStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for OperationStatus. */ + public static final OperationStatus FAILED = fromString("Failed"); + + /** Static value Canceled for OperationStatus. */ + public static final OperationStatus CANCELED = fromString("Canceled"); + + /** + * Creates or finds a OperationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperationStatus. + */ + @JsonCreator + public static OperationStatus fromString(String name) { + return fromString(name, OperationStatus.class); + } + + /** @return known OperationStatus values. */ + public static Collection values() { + return values(OperationStatus.class); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationCluster.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationCluster.java new file mode 100644 index 0000000000000..790c6755a3f38 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationCluster.java @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of OperationalizationCluster. */ +public interface OperationalizationCluster { + /** + * 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 description property: The description of the cluster. + * + * @return the description value. + */ + String description(); + + /** + * Gets the createdOn property: The date and time when the cluster was created. + * + * @return the createdOn value. + */ + OffsetDateTime createdOn(); + + /** + * Gets the modifiedOn property: The date and time when the cluster was last modified. + * + * @return the modifiedOn value. + */ + OffsetDateTime modifiedOn(); + + /** + * Gets the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, + * Provisioning, Succeeded, and Failed. + * + * @return the provisioningState value. + */ + OperationStatus provisioningState(); + + /** + * Gets the provisioningErrors property: List of provisioning errors reported by the resource provider. + * + * @return the provisioningErrors value. + */ + List provisioningErrors(); + + /** + * Gets the clusterType property: The cluster type. + * + * @return the clusterType value. + */ + ClusterType clusterType(); + + /** + * Gets the storageAccount property: Storage Account properties. + * + * @return the storageAccount value. + */ + StorageAccountProperties storageAccount(); + + /** + * Gets the containerRegistry property: Container Registry properties. + * + * @return the containerRegistry value. + */ + ContainerRegistryProperties containerRegistry(); + + /** + * Gets the containerService property: Parameters for the Azure Container Service cluster. + * + * @return the containerService value. + */ + AcsClusterProperties containerService(); + + /** + * Gets the appInsights property: AppInsights configuration. + * + * @return the appInsights value. + */ + AppInsightsProperties appInsights(); + + /** + * Gets the globalServiceConfiguration property: Contains global configuration for the web services in the cluster. + * + * @return the globalServiceConfiguration value. + */ + GlobalServiceConfiguration globalServiceConfiguration(); + + /** + * 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 inner com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterInner + * object. + * + * @return the inner object. + */ + OperationalizationClusterInner innerModel(); + + /** The entirety of the OperationalizationCluster definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The OperationalizationCluster definition stages. */ + interface DefinitionStages { + /** The first stage of the OperationalizationCluster definition. */ + interface Blank extends WithLocation { + } + /** The stage of the OperationalizationCluster 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. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the OperationalizationCluster definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the OperationalizationCluster 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.WithDescription, + DefinitionStages.WithClusterType, + DefinitionStages.WithStorageAccount, + DefinitionStages.WithContainerRegistry, + DefinitionStages.WithContainerService, + DefinitionStages.WithAppInsights, + DefinitionStages.WithGlobalServiceConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + OperationalizationCluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + OperationalizationCluster create(Context context); + } + /** The stage of the OperationalizationCluster 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 OperationalizationCluster definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the cluster.. + * + * @param description The description of the cluster. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the OperationalizationCluster definition allowing to specify clusterType. */ + interface WithClusterType { + /** + * Specifies the clusterType property: The cluster type.. + * + * @param clusterType The cluster type. + * @return the next definition stage. + */ + WithCreate withClusterType(ClusterType clusterType); + } + /** The stage of the OperationalizationCluster definition allowing to specify storageAccount. */ + interface WithStorageAccount { + /** + * Specifies the storageAccount property: Storage Account properties.. + * + * @param storageAccount Storage Account properties. + * @return the next definition stage. + */ + WithCreate withStorageAccount(StorageAccountProperties storageAccount); + } + /** The stage of the OperationalizationCluster definition allowing to specify containerRegistry. */ + interface WithContainerRegistry { + /** + * Specifies the containerRegistry property: Container Registry properties.. + * + * @param containerRegistry Container Registry properties. + * @return the next definition stage. + */ + WithCreate withContainerRegistry(ContainerRegistryProperties containerRegistry); + } + /** The stage of the OperationalizationCluster definition allowing to specify containerService. */ + interface WithContainerService { + /** + * Specifies the containerService property: Parameters for the Azure Container Service cluster.. + * + * @param containerService Parameters for the Azure Container Service cluster. + * @return the next definition stage. + */ + WithCreate withContainerService(AcsClusterProperties containerService); + } + /** The stage of the OperationalizationCluster definition allowing to specify appInsights. */ + interface WithAppInsights { + /** + * Specifies the appInsights property: AppInsights configuration.. + * + * @param appInsights AppInsights configuration. + * @return the next definition stage. + */ + WithCreate withAppInsights(AppInsightsProperties appInsights); + } + /** The stage of the OperationalizationCluster definition allowing to specify globalServiceConfiguration. */ + interface WithGlobalServiceConfiguration { + /** + * Specifies the globalServiceConfiguration property: Contains global configuration for the web services in + * the cluster.. + * + * @param globalServiceConfiguration Contains global configuration for the web services in the cluster. + * @return the next definition stage. + */ + WithCreate withGlobalServiceConfiguration(GlobalServiceConfiguration globalServiceConfiguration); + } + } + /** + * Begins update for the OperationalizationCluster resource. + * + * @return the stage of resource update. + */ + OperationalizationCluster.Update update(); + + /** The template for OperationalizationCluster update. */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + OperationalizationCluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + OperationalizationCluster apply(Context context); + } + /** The OperationalizationCluster update stages. */ + interface UpdateStages { + /** The stage of the OperationalizationCluster update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Gets or sets a list of key value pairs that describe the resource. These + * tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + * be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value + * no greater in length than 256 characters.. + * + * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in + * viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for + * a resource. Each tag must have a key no greater in length than 128 characters and a value no greater + * in length than 256 characters. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + OperationalizationCluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + OperationalizationCluster refresh(Context context); + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + OperationalizationClusterCredentials listKeys(); + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + Response listKeysWithResponse(Context context); + + /** + * Checks if updates are available for system services in the cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + CheckSystemServicesUpdatesAvailableResponse checkSystemServicesUpdatesAvailable(); + + /** + * Checks if updates are available for system services in the cluster. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + Response checkSystemServicesUpdatesAvailableWithResponse( + Context context); + + /** + * Updates system services in a cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + UpdateSystemServicesResponse updateSystemServices(); + + /** + * Updates system services in a cluster. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + UpdateSystemServicesResponse updateSystemServices(Context context); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusterCredentials.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusterCredentials.java new file mode 100644 index 0000000000000..d7db4272d120a --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusterCredentials.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.machinelearningcompute.models; + +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterCredentialsInner; + +/** An immutable client-side representation of OperationalizationClusterCredentials. */ +public interface OperationalizationClusterCredentials { + /** + * Gets the storageAccount property: Credentials for the Storage Account. + * + * @return the storageAccount value. + */ + StorageAccountCredentials storageAccount(); + + /** + * Gets the containerRegistry property: Credentials for Azure Container Registry. + * + * @return the containerRegistry value. + */ + ContainerRegistryCredentials containerRegistry(); + + /** + * Gets the containerService property: Credentials for Azure Container Service. + * + * @return the containerService value. + */ + ContainerServiceCredentials containerService(); + + /** + * Gets the appInsights property: Credentials for Azure AppInsights. + * + * @return the appInsights value. + */ + AppInsightsCredentials appInsights(); + + /** + * Gets the serviceAuthConfiguration property: Global authorization keys for all user services deployed in cluster. + * These are used if the service does not have auth keys. + * + * @return the serviceAuthConfiguration value. + */ + ServiceAuthConfiguration serviceAuthConfiguration(); + + /** + * Gets the sslConfiguration property: The SSL configuration for the services. + * + * @return the sslConfiguration value. + */ + SslConfiguration sslConfiguration(); + + /** + * Gets the inner + * com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterCredentialsInner object. + * + * @return the inner object. + */ + OperationalizationClusterCredentialsInner innerModel(); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusterUpdateParameters.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusterUpdateParameters.java new file mode 100644 index 0000000000000..d06fa9aadbf09 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusterUpdateParameters.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Parameters for PATCH operation on an operationalization cluster. */ +@Fluent +public final class OperationalizationClusterUpdateParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationalizationClusterUpdateParameters.class); + + /* + * Gets or sets a list of key value pairs that describe the resource. These + * tags can be used in viewing and grouping this resource (across resource + * groups). A maximum of 15 tags can be provided for a resource. Each tag + * must have a key no greater in length than 128 characters and a value no + * greater in length than 256 characters. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the tags property: Gets or sets a list of key value pairs that describe the resource. These tags can be used + * in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a + * resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than + * 256 characters. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets a list of key value pairs that describe the resource. These tags can be used + * in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a + * resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than + * 256 characters. + * + * @param tags the tags value to set. + * @return the OperationalizationClusterUpdateParameters object itself. + */ + public OperationalizationClusterUpdateParameters 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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusters.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusters.java new file mode 100644 index 0000000000000..370e453e66a2e --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClusters.java @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.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 OperationalizationClusters. */ +public interface OperationalizationClusters { + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + OperationalizationCluster getByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String clusterName, Context context); + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 clusterName, Boolean deleteAll); + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 clusterName); + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 clusterName, Boolean deleteAll, Context context); + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + OperationalizationClusterCredentials listKeys(String resourceGroupName, String clusterName); + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running + * operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the credentials for the specified cluster such as Storage, ACR and ACS credentials. + */ + Response listKeysWithResponse( + String resourceGroupName, String clusterName, Context context); + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + CheckSystemServicesUpdatesAvailableResponse checkSystemServicesUpdatesAvailable( + String resourceGroupName, String clusterName); + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about updates available for system services in a cluster. + */ + Response checkSystemServicesUpdatesAvailableWithResponse( + String resourceGroupName, String clusterName, Context context); + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + UpdateSystemServicesResponse updateSystemServices(String resourceGroupName, String clusterName); + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the update system services API. + */ + UpdateSystemServicesResponse updateSystemServices(String resourceGroupName, String clusterName, Context context); + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the clusters in the specified resource group. + */ + PagedIterable listByResourceGroup( + String resourceGroupName, String skiptoken, Context context); + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + PagedIterable list(); + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization clusters in the specified subscription. + */ + PagedIterable list(String skiptoken, Context context); + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + OperationalizationCluster getById(String id); + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call + * ListKeys to get them. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operationalization cluster resource view. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified cluster. + * + * @param id the resource ID. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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, Boolean deleteAll, Context context); + + /** + * Begins definition for a new OperationalizationCluster resource. + * + * @param name resource name. + * @return the first stage of the new OperationalizationCluster definition. + */ + OperationalizationCluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersDeleteHeaders.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersDeleteHeaders.java new file mode 100644 index 0000000000000..833a7e91ab6b7 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersDeleteHeaders.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OperationalizationClustersDeleteHeaders model. */ +@Fluent +public final class OperationalizationClustersDeleteHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationalizationClustersDeleteHeaders.class); + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OperationalizationClustersDeleteHeaders object itself. + */ + public OperationalizationClustersDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersDeleteResponse.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersDeleteResponse.java new file mode 100644 index 0000000000000..08e4a6ff8c368 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersDeleteResponse.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.machinelearningcompute.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class OperationalizationClustersDeleteResponse + extends ResponseBase { + /** + * Creates an instance of OperationalizationClustersDeleteResponse. + * + * @param request the request which resulted in this OperationalizationClustersDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OperationalizationClustersDeleteResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + OperationalizationClustersDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersUpdateSystemServicesHeaders.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersUpdateSystemServicesHeaders.java new file mode 100644 index 0000000000000..adc35ead556b6 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersUpdateSystemServicesHeaders.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OperationalizationClustersUpdateSystemServicesHeaders model. */ +@Fluent +public final class OperationalizationClustersUpdateSystemServicesHeaders { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(OperationalizationClustersUpdateSystemServicesHeaders.class); + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OperationalizationClustersUpdateSystemServicesHeaders object itself. + */ + public OperationalizationClustersUpdateSystemServicesHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersUpdateSystemServicesResponse.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersUpdateSystemServicesResponse.java new file mode 100644 index 0000000000000..a30235ca8c9c2 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OperationalizationClustersUpdateSystemServicesResponse.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.machinelearningcompute.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.UpdateSystemServicesResponseInner; + +/** Contains all response data for the updateSystemServices operation. */ +public final class OperationalizationClustersUpdateSystemServicesResponse + extends ResponseBase { + /** + * Creates an instance of OperationalizationClustersUpdateSystemServicesResponse. + * + * @param request the request which resulted in this OperationalizationClustersUpdateSystemServicesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OperationalizationClustersUpdateSystemServicesResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + UpdateSystemServicesResponseInner value, + OperationalizationClustersUpdateSystemServicesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public UpdateSystemServicesResponseInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OrchestratorType.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OrchestratorType.java new file mode 100644 index 0000000000000..f796cdd1cbadc --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/OrchestratorType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OrchestratorType. */ +public final class OrchestratorType extends ExpandableStringEnum { + /** Static value Kubernetes for OrchestratorType. */ + public static final OrchestratorType KUBERNETES = fromString("Kubernetes"); + + /** Static value None for OrchestratorType. */ + public static final OrchestratorType NONE = fromString("None"); + + /** + * Creates or finds a OrchestratorType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OrchestratorType. + */ + @JsonCreator + public static OrchestratorType fromString(String name) { + return fromString(name, OrchestratorType.class); + } + + /** @return known OrchestratorType values. */ + public static Collection values() { + return values(OrchestratorType.class); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/PaginatedOperationalizationClustersList.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/PaginatedOperationalizationClustersList.java new file mode 100644 index 0000000000000..1f30df525ddfc --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/PaginatedOperationalizationClustersList.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningcompute.fluent.models.OperationalizationClusterInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Paginated list of operationalization clusters. */ +@Fluent +public final class PaginatedOperationalizationClustersList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PaginatedOperationalizationClustersList.class); + + /* + * An array of cluster 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 cluster objects. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of cluster objects. + * + * @param value the value value to set. + * @return the PaginatedOperationalizationClustersList object itself. + */ + public PaginatedOperationalizationClustersList 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 PaginatedOperationalizationClustersList object itself. + */ + public PaginatedOperationalizationClustersList 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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ResourceOperation.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ResourceOperation.java new file mode 100644 index 0000000000000..f8ec44d164cf6 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ResourceOperation.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resource operation. */ +@Fluent +public final class ResourceOperation { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceOperation.class); + + /* + * Name of this operation. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Display of the operation. + */ + @JsonProperty(value = "display") + private ResourceOperationDisplay display; + + /* + * The operation origin. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Get the name property: Name of this operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of this operation. + * + * @param name the name value to set. + * @return the ResourceOperation object itself. + */ + public ResourceOperation withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display property: Display of the operation. + * + * @return the display value. + */ + public ResourceOperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Display of the operation. + * + * @param display the display value to set. + * @return the ResourceOperation object itself. + */ + public ResourceOperation withDisplay(ResourceOperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The operation origin. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin property: The operation origin. + * + * @param origin the origin value to set. + * @return the ResourceOperation object itself. + */ + public ResourceOperation withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ResourceOperationDisplay.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ResourceOperationDisplay.java new file mode 100644 index 0000000000000..ef9b84226c4db --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ResourceOperationDisplay.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Display of the operation. */ +@Fluent +public final class ResourceOperationDisplay { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceOperationDisplay.class); + + /* + * The resource provider name. + */ + @JsonProperty(value = "provider") + private String provider; + + /* + * The resource name. + */ + @JsonProperty(value = "resource") + private String resource; + + /* + * The operation. + */ + @JsonProperty(value = "operation") + private String operation; + + /* + * The description of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the provider property: The resource provider name. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: The resource provider name. + * + * @param provider the provider value to set. + * @return the ResourceOperationDisplay object itself. + */ + public ResourceOperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource property: The resource name. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource property: The resource name. + * + * @param resource the resource value to set. + * @return the ResourceOperationDisplay object itself. + */ + public ResourceOperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the operation property: The operation. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation property: The operation. + * + * @param operation the operation value to set. + * @return the ResourceOperationDisplay object itself. + */ + public ResourceOperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description property: The description of the operation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the operation. + * + * @param description the description value to set. + * @return the ResourceOperationDisplay object itself. + */ + public ResourceOperationDisplay withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ServiceAuthConfiguration.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ServiceAuthConfiguration.java new file mode 100644 index 0000000000000..a76974632fae7 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ServiceAuthConfiguration.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Global service auth configuration properties. These are the data-plane authorization keys and are used if a service + * doesn't define it's own. + */ +@Fluent +public final class ServiceAuthConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceAuthConfiguration.class); + + /* + * The primary auth key hash. This is not returned in response of GET/PUT + * on the resource.. To see this please call listKeys API. + */ + @JsonProperty(value = "primaryAuthKeyHash", required = true) + private String primaryAuthKeyHash; + + /* + * The secondary auth key hash. This is not returned in response of GET/PUT + * on the resource.. To see this please call listKeys API. + */ + @JsonProperty(value = "secondaryAuthKeyHash", required = true) + private String secondaryAuthKeyHash; + + /** + * Get the primaryAuthKeyHash property: The primary auth key hash. This is not returned in response of GET/PUT on + * the resource.. To see this please call listKeys API. + * + * @return the primaryAuthKeyHash value. + */ + public String primaryAuthKeyHash() { + return this.primaryAuthKeyHash; + } + + /** + * Set the primaryAuthKeyHash property: The primary auth key hash. This is not returned in response of GET/PUT on + * the resource.. To see this please call listKeys API. + * + * @param primaryAuthKeyHash the primaryAuthKeyHash value to set. + * @return the ServiceAuthConfiguration object itself. + */ + public ServiceAuthConfiguration withPrimaryAuthKeyHash(String primaryAuthKeyHash) { + this.primaryAuthKeyHash = primaryAuthKeyHash; + return this; + } + + /** + * Get the secondaryAuthKeyHash property: The secondary auth key hash. This is not returned in response of GET/PUT + * on the resource.. To see this please call listKeys API. + * + * @return the secondaryAuthKeyHash value. + */ + public String secondaryAuthKeyHash() { + return this.secondaryAuthKeyHash; + } + + /** + * Set the secondaryAuthKeyHash property: The secondary auth key hash. This is not returned in response of GET/PUT + * on the resource.. To see this please call listKeys API. + * + * @param secondaryAuthKeyHash the secondaryAuthKeyHash value to set. + * @return the ServiceAuthConfiguration object itself. + */ + public ServiceAuthConfiguration withSecondaryAuthKeyHash(String secondaryAuthKeyHash) { + this.secondaryAuthKeyHash = secondaryAuthKeyHash; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (primaryAuthKeyHash() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property primaryAuthKeyHash in model ServiceAuthConfiguration")); + } + if (secondaryAuthKeyHash() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property secondaryAuthKeyHash in model ServiceAuthConfiguration")); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ServicePrincipalProperties.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ServicePrincipalProperties.java new file mode 100644 index 0000000000000..8c87683f2d208 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/ServicePrincipalProperties.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Azure service principal used by Kubernetes for configuring load balancers. */ +@Fluent +public final class ServicePrincipalProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicePrincipalProperties.class); + + /* + * The service principal client ID + */ + @JsonProperty(value = "clientId", required = true) + private String clientId; + + /* + * The service principal secret. This is not returned in response of + * GET/PUT on the resource. To see this please call listKeys. + */ + @JsonProperty(value = "secret", required = true) + private String secret; + + /** + * Get the clientId property: The service principal client ID. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The service principal client ID. + * + * @param clientId the clientId value to set. + * @return the ServicePrincipalProperties object itself. + */ + public ServicePrincipalProperties withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the secret property: The service principal secret. This is not returned in response of GET/PUT on the + * resource. To see this please call listKeys. + * + * @return the secret value. + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret property: The service principal secret. This is not returned in response of GET/PUT on the + * resource. To see this please call listKeys. + * + * @param secret the secret value to set. + * @return the ServicePrincipalProperties object itself. + */ + public ServicePrincipalProperties withSecret(String secret) { + this.secret = secret; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clientId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property clientId in model ServicePrincipalProperties")); + } + if (secret() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property secret in model ServicePrincipalProperties")); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SslConfiguration.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SslConfiguration.java new file mode 100644 index 0000000000000..2d2bacb9bea8b --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SslConfiguration.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SSL configuration. If configured data-plane calls to user services will be exposed over SSL only. */ +@Fluent +public final class SslConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SslConfiguration.class); + + /* + * SSL status. Allowed values are Enabled and Disabled. + */ + @JsonProperty(value = "status") + private Status status; + + /* + * The SSL cert data in PEM format. + */ + @JsonProperty(value = "cert") + private String cert; + + /* + * The SSL key data in PEM format. This is not returned in response of + * GET/PUT on the resource. To see this please call listKeys API. + */ + @JsonProperty(value = "key") + private String key; + + /* + * The CName of the certificate. + */ + @JsonProperty(value = "cname") + private String cname; + + /** + * Get the status property: SSL status. Allowed values are Enabled and Disabled. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Set the status property: SSL status. Allowed values are Enabled and Disabled. + * + * @param status the status value to set. + * @return the SslConfiguration object itself. + */ + public SslConfiguration withStatus(Status status) { + this.status = status; + return this; + } + + /** + * Get the cert property: The SSL cert data in PEM format. + * + * @return the cert value. + */ + public String cert() { + return this.cert; + } + + /** + * Set the cert property: The SSL cert data in PEM format. + * + * @param cert the cert value to set. + * @return the SslConfiguration object itself. + */ + public SslConfiguration withCert(String cert) { + this.cert = cert; + return this; + } + + /** + * Get the key property: The SSL key data in PEM format. This is not returned in response of GET/PUT on the + * resource. To see this please call listKeys API. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The SSL key data in PEM format. This is not returned in response of GET/PUT on the + * resource. To see this please call listKeys API. + * + * @param key the key value to set. + * @return the SslConfiguration object itself. + */ + public SslConfiguration withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the cname property: The CName of the certificate. + * + * @return the cname value. + */ + public String cname() { + return this.cname; + } + + /** + * Set the cname property: The CName of the certificate. + * + * @param cname the cname value to set. + * @return the SslConfiguration object itself. + */ + public SslConfiguration withCname(String cname) { + this.cname = cname; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/Status.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/Status.java new file mode 100644 index 0000000000000..a9a4313dbc012 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/Status.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Status. */ +public final class Status extends ExpandableStringEnum { + /** Static value Enabled for Status. */ + public static final Status ENABLED = fromString("Enabled"); + + /** Static value Disabled for Status. */ + public static final Status DISABLED = fromString("Disabled"); + + /** + * Creates or finds a Status from its string representation. + * + * @param name a name to look for. + * @return the corresponding Status. + */ + @JsonCreator + public static Status fromString(String name) { + return fromString(name, Status.class); + } + + /** @return known Status values. */ + public static Collection values() { + return values(Status.class); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/StorageAccountCredentials.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/StorageAccountCredentials.java new file mode 100644 index 0000000000000..278484f9aa809 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/StorageAccountCredentials.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Access information for the storage account. */ +@Immutable +public final class StorageAccountCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountCredentials.class); + + /* + * The ARM resource ID of the storage account. + */ + @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceId; + + /* + * The primary key of the storage account. + */ + @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String primaryKey; + + /* + * The secondary key of the storage account. + */ + @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryKey; + + /** + * Get the resourceId property: The ARM resource ID of the storage account. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the primaryKey property: The primary key of the storage account. + * + * @return the primaryKey value. + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Get the secondaryKey property: The secondary key of the storage account. + * + * @return the secondaryKey value. + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/StorageAccountProperties.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/StorageAccountProperties.java new file mode 100644 index 0000000000000..60f35e81598a8 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/StorageAccountProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of Storage Account. */ +@Fluent +public final class StorageAccountProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountProperties.class); + + /* + * ARM resource ID of the Azure Storage Account to store CLI specific + * files. If not provided one will be created. This cannot be changed once + * the cluster is created. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get the resourceId property: ARM resource ID of the Azure Storage Account to store CLI specific files. If not + * provided one will be created. This cannot be changed once the cluster is created. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: ARM resource ID of the Azure Storage Account to store CLI specific files. If not + * provided one will be created. This cannot be changed once the cluster is created. + * + * @param resourceId the resourceId value to set. + * @return the StorageAccountProperties object itself. + */ + public StorageAccountProperties 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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SystemService.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SystemService.java new file mode 100644 index 0000000000000..0fb4f6cfb3c6f --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SystemService.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.machinelearningcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information about a system service deployed in the cluster. */ +@Fluent +public final class SystemService { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SystemService.class); + + /* + * The system service type + */ + @JsonProperty(value = "systemServiceType", required = true) + private SystemServiceType systemServiceType; + + /* + * The public IP address of the system service + */ + @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String publicIpAddress; + + /* + * The state of the system service + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** + * Get the systemServiceType property: The system service type. + * + * @return the systemServiceType value. + */ + public SystemServiceType systemServiceType() { + return this.systemServiceType; + } + + /** + * Set the systemServiceType property: The system service type. + * + * @param systemServiceType the systemServiceType value to set. + * @return the SystemService object itself. + */ + public SystemService withSystemServiceType(SystemServiceType systemServiceType) { + this.systemServiceType = systemServiceType; + return this; + } + + /** + * Get the publicIpAddress property: The public IP address of the system service. + * + * @return the publicIpAddress value. + */ + public String publicIpAddress() { + return this.publicIpAddress; + } + + /** + * Get the version property: The state of the system service. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (systemServiceType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property systemServiceType in model SystemService")); + } + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SystemServiceType.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SystemServiceType.java new file mode 100644 index 0000000000000..ea1328ff02af2 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/SystemServiceType.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.machinelearningcompute.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SystemServiceType. */ +public final class SystemServiceType extends ExpandableStringEnum { + /** Static value None for SystemServiceType. */ + public static final SystemServiceType NONE = fromString("None"); + + /** Static value ScoringFrontEnd for SystemServiceType. */ + public static final SystemServiceType SCORING_FRONT_END = fromString("ScoringFrontEnd"); + + /** Static value BatchFrontEnd for SystemServiceType. */ + public static final SystemServiceType BATCH_FRONT_END = fromString("BatchFrontEnd"); + + /** + * Creates or finds a SystemServiceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SystemServiceType. + */ + @JsonCreator + public static SystemServiceType fromString(String name) { + return fromString(name, SystemServiceType.class); + } + + /** @return known SystemServiceType values. */ + public static Collection values() { + return values(SystemServiceType.class); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/UpdateSystemServicesResponse.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/UpdateSystemServicesResponse.java new file mode 100644 index 0000000000000..c65245705f78a --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/UpdateSystemServicesResponse.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.resourcemanager.machinelearningcompute.fluent.models.UpdateSystemServicesResponseInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of UpdateSystemServicesResponse. */ +public interface UpdateSystemServicesResponse { + /** + * Gets the updateStatus property: Update status. + * + * @return the updateStatus value. + */ + OperationStatus updateStatus(); + + /** + * Gets the updateStartedOn property: The date and time when the last system services update was started. + * + * @return the updateStartedOn value. + */ + OffsetDateTime updateStartedOn(); + + /** + * Gets the updateCompletedOn property: The date and time when the last system services update completed. + * + * @return the updateCompletedOn value. + */ + OffsetDateTime updateCompletedOn(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningcompute.fluent.models.UpdateSystemServicesResponseInner + * object. + * + * @return the inner object. + */ + UpdateSystemServicesResponseInner innerModel(); +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/UpdatesAvailable.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/UpdatesAvailable.java new file mode 100644 index 0000000000000..337739d53a9fa --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/UpdatesAvailable.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for UpdatesAvailable. */ +public final class UpdatesAvailable extends ExpandableStringEnum { + /** Static value Yes for UpdatesAvailable. */ + public static final UpdatesAvailable YES = fromString("Yes"); + + /** Static value No for UpdatesAvailable. */ + public static final UpdatesAvailable NO = fromString("No"); + + /** + * Creates or finds a UpdatesAvailable from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpdatesAvailable. + */ + @JsonCreator + public static UpdatesAvailable fromString(String name) { + return fromString(name, UpdatesAvailable.class); + } + + /** @return known UpdatesAvailable values. */ + public static Collection values() { + return values(UpdatesAvailable.class); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/package-info.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/package-info.java new file mode 100644 index 0000000000000..df11ed6b28d24 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/models/package-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for MachineLearningComputeManagementClient. These APIs allow end users to operate + * on Azure Machine Learning Compute resources. They support the following operations:<ul><li>Create or + * update a cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete a + * cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system + * services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in + * a resource group</li><li>Get all clusters in a subscription</li></ul>. + */ +package com.azure.resourcemanager.machinelearningcompute.models; diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/package-info.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/package-info.java new file mode 100644 index 0000000000000..f73c4ecfba7c7 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/com/azure/resourcemanager/machinelearningcompute/package-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for MachineLearningComputeManagementClient. These APIs allow end users to operate on + * Azure Machine Learning Compute resources. They support the following operations:<ul><li>Create or update + * a cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete a + * cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system + * services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in + * a resource group</li><li>Get all clusters in a subscription</li></ul>. + */ +package com.azure.resourcemanager.machinelearningcompute; diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/module-info.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/module-info.java new file mode 100644 index 0000000000000..a8821c7c2e9d7 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/main/java/module-info.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.machinelearningcompute { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.machinelearningcompute; + exports com.azure.resourcemanager.machinelearningcompute.fluent; + exports com.azure.resourcemanager.machinelearningcompute.fluent.models; + exports com.azure.resourcemanager.machinelearningcompute.models; + + opens com.azure.resourcemanager.machinelearningcompute.fluent.models to + com.azure.core, + com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.machinelearningcompute.models to + com.azure.core, + com.fasterxml.jackson.databind; +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/MachineLearningComputeListAvailableOperationsSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/MachineLearningComputeListAvailableOperationsSamples.java new file mode 100644 index 0000000000000..b6bf7b956175e --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/MachineLearningComputeListAvailableOperationsSamples.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.machinelearningcompute.generated; + +import com.azure.core.util.Context; + +/** Samples for MachineLearningCompute ListAvailableOperations. */ +public final class MachineLearningComputeListAvailableOperationsSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/MachineLearningCompute_ListAvailableOperations.json + */ + /** + * Sample code: Machine Learning Compute List Available Operations. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void machineLearningComputeListAvailableOperations( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.machineLearningComputes().listAvailableOperationsWithResponse(Context.NONE); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersCheckSystemServicesUpdatesAvailableSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersCheckSystemServicesUpdatesAvailableSamples.java new file mode 100644 index 0000000000000..4632b81467375 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersCheckSystemServicesUpdatesAvailableSamples.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.machinelearningcompute.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters CheckSystemServicesUpdatesAvailable. */ +public final class OperationalizationClustersCheckSystemServicesUpdatesAvailableSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CheckSystemServicesUpdatesAvailable.json + */ + /** + * Sample code: Check Update for an Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void checkUpdateForAnOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager + .operationalizationClusters() + .checkSystemServicesUpdatesAvailableWithResponse("myResourceGroup", "myCluster", Context.NONE); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersCreateOrUpdateSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..b98d945ca7f0c --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersCreateOrUpdateSamples.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.generated; + +import com.azure.resourcemanager.machinelearningcompute.models.AcsClusterProperties; +import com.azure.resourcemanager.machinelearningcompute.models.ClusterType; +import com.azure.resourcemanager.machinelearningcompute.models.GlobalServiceConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.KubernetesClusterProperties; +import com.azure.resourcemanager.machinelearningcompute.models.OrchestratorType; +import com.azure.resourcemanager.machinelearningcompute.models.ServicePrincipalProperties; +import com.azure.resourcemanager.machinelearningcompute.models.SslConfiguration; +import com.azure.resourcemanager.machinelearningcompute.models.Status; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OperationalizationClusters CreateOrUpdate. */ +public final class OperationalizationClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CreateOrUpdate.json + */ + /** + * Sample code: PUT Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void pUTOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager + .operationalizationClusters() + .define("myCluster") + .withRegion("West US") + .withExistingResourceGroup("myResourceGroup") + .withTags(mapOf("key1", "alpha", "key2", "beta")) + .withDescription("My Operationalization Cluster") + .withClusterType(ClusterType.ACS) + .withContainerService( + new AcsClusterProperties() + .withOrchestratorType(OrchestratorType.KUBERNETES) + .withOrchestratorProperties( + new KubernetesClusterProperties() + .withServicePrincipal( + new ServicePrincipalProperties() + .withClientId("abcdefghijklmnopqrt") + .withSecret("")))) + .withGlobalServiceConfiguration( + new GlobalServiceConfiguration() + .withSsl( + new SslConfiguration() + .withStatus(Status.ENABLED) + .withCert("afjdklq2131casfakld=") + .withKey("flksdafkldsajf=") + .withCname("foo.bar.com")) + .withAdditionalProperties(mapOf())) + .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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersDeleteSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersDeleteSamples.java new file mode 100644 index 0000000000000..b653141ef1b46 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersDeleteSamples.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.machinelearningcompute.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters Delete. */ +public final class OperationalizationClustersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Delete.json + */ + /** + * Sample code: DELETE Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void dELETEOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().delete("myResourceGroup", "myCluster", null, Context.NONE); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersGetByResourceGroupSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..2bb44872a08fa --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersGetByResourceGroupSamples.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.machinelearningcompute.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters GetByResourceGroup. */ +public final class OperationalizationClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Get.json + */ + /** + * Sample code: GET Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void gETOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager + .operationalizationClusters() + .getByResourceGroupWithResponse("myResourceGroup", "myCluster", Context.NONE); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListByResourceGroupSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListByResourceGroupSamples.java new file mode 100644 index 0000000000000..328606906bff9 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListByResourceGroupSamples.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.machinelearningcompute.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters ListByResourceGroup. */ +public final class OperationalizationClustersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListByResourceGroup.json + */ + /** + * Sample code: List Operationalization Clusters by Resource Group. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void listOperationalizationClustersByResourceGroup( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().listByResourceGroup("myResourceGroup", null, Context.NONE); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListKeysSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListKeysSamples.java new file mode 100644 index 0000000000000..43534f4b43e71 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListKeysSamples.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.machinelearningcompute.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters ListKeys. */ +public final class OperationalizationClustersListKeysSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListKeys.json + */ + /** + * Sample code: List Keys of an Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void listKeysOfAnOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().listKeysWithResponse("myResourceGroup", "myCluster", Context.NONE); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListSamples.java new file mode 100644 index 0000000000000..213870ca44c03 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersListSamples.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.machinelearningcompute.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters List. */ +public final class OperationalizationClustersListSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListBySubscription.json + */ + /** + * Sample code: List Operationalization Clusters by Subscription. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void listOperationalizationClustersBySubscription( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().list(null, Context.NONE); + } +} diff --git a/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersUpdateSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersUpdateSamples.java new file mode 100644 index 0000000000000..66987d9e29624 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningcompute.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningcompute.models.OperationalizationCluster; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OperationalizationClusters Update. */ +public final class OperationalizationClustersUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Update.json + */ + /** + * Sample code: PATCH Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void pATCHOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + OperationalizationCluster resource = + manager + .operationalizationClusters() + .getByResourceGroupWithResponse("myResourceGroup", "myCluster", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key1", "value1")).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/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersUpdateSystemServicesSamples.java b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersUpdateSystemServicesSamples.java new file mode 100644 index 0000000000000..cd215dca5ef31 --- /dev/null +++ b/sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/src/samples/java/com/azure/resourcemanager/machinelearningcompute/generated/OperationalizationClustersUpdateSystemServicesSamples.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.machinelearningcompute.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationalizationClusters UpdateSystemServices. */ +public final class OperationalizationClustersUpdateSystemServicesSamples { + /* + * x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_UpdateSystemServices.json + */ + /** + * Sample code: Update System Services in an Operationalization Cluster. + * + * @param manager Entry point to MachineLearningComputeManager. + */ + public static void updateSystemServicesInAnOperationalizationCluster( + com.azure.resourcemanager.machinelearningcompute.MachineLearningComputeManager manager) { + manager.operationalizationClusters().updateSystemServices("myResourceGroup", "myCluster", Context.NONE); + } +} diff --git a/sdk/machinelearningcompute/ci.yml b/sdk/machinelearningcompute/ci.yml new file mode 100644 index 0000000000000..c7a3860d03193 --- /dev/null +++ b/sdk/machinelearningcompute/ci.yml @@ -0,0 +1,39 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/machinelearningcompute/ci.yml + - sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/ + exclude: + - sdk/machinelearningcompute/pom.xml + - sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/machinelearningcompute/ci.yml + - sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/ + exclude: + - sdk/machinelearningcompute/pom.xml + - sdk/machinelearningcompute/azure-resourcemanager-machinelearningcompute/pom.xml + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: machinelearningcompute + Artifacts: + - name: azure-resourcemanager-machinelearningcompute + groupId: com.azure.resourcemanager + safeName: azureresourcemanagermachinelearningcompute diff --git a/sdk/machinelearningcompute/pom.xml b/sdk/machinelearningcompute/pom.xml new file mode 100644 index 0000000000000..288e6852d984a --- /dev/null +++ b/sdk/machinelearningcompute/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + com.azure + azure-machinelearningcompute-service + pom + 1.0.0 + + + + coverage + + + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + report-aggregate + verify + + report-aggregate + + + ${project.reporting.outputDirectory}/test-coverage + + + + + + + + + default + + true + + + azure-resourcemanager-machinelearningcompute + + + +